ContainerServiceMachineCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a machine in the specified agent pool.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}.
  • Operation Id. : Machines_CreateOrUpdate.
  • Default Api Version. : 2026-01-02-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.ContainerServiceMachineResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string machineName, Azure.ResourceManager.ContainerService.ContainerServiceMachineData data, Azure.MatchConditions matchConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ContainerService.ContainerServiceMachineData * Azure.MatchConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.ContainerServiceMachineResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ContainerService.ContainerServiceMachineData * Azure.MatchConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerService.ContainerServiceMachineResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, machineName As String, data As ContainerServiceMachineData, Optional matchConditions As MatchConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ContainerServiceMachineResource))

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.

machineName
String

Host name of the machine.

data
ContainerServiceMachineData

The machine to create or update.

matchConditions
MatchConditions

The content to send as the request conditions of the request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

machineName or data is null.

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

Applies to