다음을 통해 공유


AvailabilitySetCollection.CreateOrUpdateAsync Method

Definition

Create or update an availability set.

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

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.

availabilitySetName
String

The name of the availability set.

data
AvailabilitySetData

Parameters supplied to the Create Availability Set operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

availabilitySetName or data is null.

Applies to