Esempio n. 1
0
 /// <summary>
 /// 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.
 /// </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> BeginPowerOffAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginPowerOffWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 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.
 /// </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='skipShutdown'>
 /// 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
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginPowerOffAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, bool?skipShutdown = false, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginPowerOffWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, skipShutdown, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }