Share via


DedicatedHostGroupCollection.CreateOrUpdateAsync Method

Definition

Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)

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

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.

hostGroupName
String

The name of the dedicated host group.

data
DedicatedHostGroupData

Parameters supplied to the Create Dedicated Host Group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

hostGroupName or data is null.

Applies to