StorageTaskCollection.CreateOrUpdate 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.
Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already created and a subsequent create request is issued with different properties, the storage task properties will be updated. If a storage task 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.StorageActions/storageTasks/{storageTaskName}
- Operation Id: StorageTasks_Create
- Default Api Version: 2023-01-01
- Resource: StorageTaskResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageActions.StorageTaskResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string storageTaskName, Azure.ResourceManager.StorageActions.StorageTaskData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.StorageActions.StorageTaskData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageActions.StorageTaskResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.StorageActions.StorageTaskData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageActions.StorageTaskResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, storageTaskName As String, data As StorageTaskData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of StorageTaskResource)
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.
- storageTaskName
- String
The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only.
- data
- StorageTaskData
The parameters to create a Storage Task.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
storageTaskName
is an empty string, and was expected to be non-empty.
storageTaskName
or data
is null.