StorageTargetCollection.CreateOrUpdateAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create or update a Storage Target. This operation is allowed at any time, but if the cache is down or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache is healthy again.
- Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}
- Operation Id: StorageTargets_CreateOrUpdate
- Default Api Version: 2024-03-01
- Resource: StorageTargetResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageCache.StorageTargetResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string storageTargetName, Azure.ResourceManager.StorageCache.StorageTargetData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.StorageCache.StorageTargetData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageCache.StorageTargetResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.StorageCache.StorageTargetData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageCache.StorageTargetResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, storageTargetName As String, data As StorageTargetData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of StorageTargetResource))
Parameters
- waitUntil
- WaitUntil
Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- storageTargetName
- String
Name of Storage Target.
- data
- StorageTargetData
Object containing the definition of a Storage Target.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
storageTargetName
is an empty string, and was expected to be non-empty.
storageTargetName
or data
is null.
Applies to
Azure SDK for .NET