Share via


StorageMoverAgentCollection.CreateOrUpdate 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageMover.StorageMoverAgentResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string agentName, Azure.ResourceManager.StorageMover.StorageMoverAgentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.StorageMover.StorageMoverAgentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageMover.StorageMoverAgentResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.StorageMover.StorageMoverAgentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageMover.StorageMoverAgentResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, agentName As String, data As StorageMoverAgentData, Optional cancellationToken As CancellationToken = Nothing) As 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