共用方式為


StorageSyncRegisteredServerCollection.CreateOrUpdateAsync Method

Definition

Add a new registered server.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}
  • Operation Id: RegisteredServers_Create
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageSync.StorageSyncRegisteredServerResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, Guid serverId, Azure.ResourceManager.StorageSync.Models.StorageSyncRegisteredServerCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * Guid * Azure.ResourceManager.StorageSync.Models.StorageSyncRegisteredServerCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageSync.StorageSyncRegisteredServerResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * Guid * Azure.ResourceManager.StorageSync.Models.StorageSyncRegisteredServerCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageSync.StorageSyncRegisteredServerResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, serverId As Guid, content As StorageSyncRegisteredServerCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of StorageSyncRegisteredServerResource))

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.

serverId
Guid

GUID identifying the on-premises server.

content
StorageSyncRegisteredServerCreateOrUpdateContent

Body of Registered Server object.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

content is null.

Applies to