Share via


StorageTaskAssignmentCollection.CreateOrUpdateAsync Method

Definition

Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}
  • Operation Id: StorageTaskAssignments_Create
  • Default Api Version: 2023-05-01
  • Resource: StorageTaskAssignmentResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.StorageTaskAssignmentResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string storageTaskAssignmentName, Azure.ResourceManager.Storage.StorageTaskAssignmentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Storage.StorageTaskAssignmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.StorageTaskAssignmentResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Storage.StorageTaskAssignmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.StorageTaskAssignmentResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, storageTaskAssignmentName As String, data As StorageTaskAssignmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of StorageTaskAssignmentResource))

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.

storageTaskAssignmentName
String

The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

data
StorageTaskAssignmentData

The parameters to create a Storage Task Assignment.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

storageTaskAssignmentName is an empty string, and was expected to be non-empty.

storageTaskAssignmentName or data is null.

Applies to