/// <summary> /// Deallocates a specific virtual machine in a VM scale set. Shuts down the /// virtual machine and releases the compute resources it uses. You are not /// billed for the compute resources of this virtual machine once it is /// deallocated. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='vmScaleSetName'> /// The name of the VM scale set. /// </param> /// <param name='instanceId'> /// The instance ID of the virtual machine. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationStatusResponseInner> BeginDeallocateAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginDeallocateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deallocates a specific virtual machine in a VM scale set. Shuts down the /// virtual machine and releases the compute resources it uses. You are not /// billed for the compute resources of this virtual machine once it is /// deallocated. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='vmScaleSetName'> /// The name of the VM scale set. /// </param> /// <param name='instanceId'> /// The instance ID of the virtual machine. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeallocateAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeallocateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }