Share via


MachineRunCommandCollection.CreateOrUpdateAsync Method

Definition

The operation to create or update a run command.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}
  • Operation Id: MachineRunCommands_CreateOrUpdate
  • Default Api Version: 2024-05-20-preview
  • Resource: MachineRunCommandResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.HybridCompute.MachineRunCommandResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string runCommandName, Azure.ResourceManager.HybridCompute.MachineRunCommandData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.HybridCompute.MachineRunCommandData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.HybridCompute.MachineRunCommandResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.HybridCompute.MachineRunCommandData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.HybridCompute.MachineRunCommandResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, runCommandName As String, data As MachineRunCommandData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of MachineRunCommandResource))

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.

runCommandName
String

The name of the run command.

data
MachineRunCommandData

Parameters supplied to the Create Run Command.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

runCommandName or data is null.

Applies to