Share via


StorageMoverAgentCollection.CreateOrUpdateAsync Method

Definition

Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}
  • Operation Id: Agents_CreateOrUpdate
  • Default Api Version: 2024-07-01
  • Resource: StorageMoverAgentResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageMover.StorageMoverAgentResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string agentName, Azure.ResourceManager.StorageMover.StorageMoverAgentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.StorageMover.StorageMoverAgentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageMover.StorageMoverAgentResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.StorageMover.StorageMoverAgentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageMover.StorageMoverAgentResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, agentName As String, data As StorageMoverAgentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of StorageMoverAgentResource))

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.

agentName
String

The name of the Agent resource.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

agentName or data is null.

Applies to