VirtualMachineScaleSetVMsOperations.StartPowerOffAsync(String, String, String, Nullable<Boolean>, CancellationToken) Method

Definition

Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.

public virtual System.Threading.Tasks.Task<Azure.ResourceManager.Compute.VirtualMachineScaleSetVMsPowerOffOperation> StartPowerOffAsync (string resourceGroupName, string vmScaleSetName, string instanceId, bool? skipShutdown = default, System.Threading.CancellationToken cancellationToken = default);
abstract member StartPowerOffAsync : string * string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.Compute.VirtualMachineScaleSetVMsPowerOffOperation>
override this.StartPowerOffAsync : string * string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.Compute.VirtualMachineScaleSetVMsPowerOffOperation>
Public Overridable Function StartPowerOffAsync (resourceGroupName As String, vmScaleSetName As String, instanceId As String, Optional skipShutdown As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of VirtualMachineScaleSetVMsPowerOffOperation)

Parameters

resourceGroupName
System.String

The name of the resource group.

vmScaleSetName
System.String

The name of the VM scale set.

instanceId
System.String

The instance ID of the virtual machine.

skipShutdown
System.Nullable<System.Boolean>

The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified.

cancellationToken
System.Threading.CancellationToken

The cancellation token to use.

Returns

System.Threading.Tasks.Task<VirtualMachineScaleSetVMsPowerOffOperation>

Exceptions

System.ArgumentNullException

resourceGroupName, vmScaleSetName, or instanceId is null.

Applies to