Condividi tramite


VirtualMachineResource.RunCommand 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult> RunCommand (Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.RunCommandInput input, System.Threading.CancellationToken cancellationToken = default);
abstract member RunCommand : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.RunCommandInput * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult>
override this.RunCommand : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.RunCommandInput * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult>
Public Overridable Function RunCommand (waitUntil As WaitUntil, input As RunCommandInput, Optional cancellationToken As CancellationToken = Nothing) As 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