Share via


VirtualMachineResource.RunCommandAsync Method

Definition

Run command on the VM.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand
  • Operation Id: VirtualMachines_RunCommand
  • Default Api Version: 2024-07-01
  • Resource: VirtualMachineResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult>> RunCommandAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.RunCommandInput input, System.Threading.CancellationToken cancellationToken = default);
abstract member RunCommandAsync : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.RunCommandInput * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult>>
override this.RunCommandAsync : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.RunCommandInput * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult>>
Public Overridable Function RunCommandAsync (waitUntil As WaitUntil, input As RunCommandInput, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of VirtualMachineRunCommandResult))

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.

input
RunCommandInput

Parameters supplied to the Run command operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

input is null.

Applies to