共用方式為


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