/// <summary> /// Deletes virtual machines in a VM scale set. /// </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='instanceIds'> /// The virtual machine scale set instance ids. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationStatusResponseInner> DeleteInstancesAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList <string> instanceIds, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes virtual machines in a VM scale set. /// </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='instanceIds'> /// The virtual machine scale set instance ids. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteInstancesAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList <string> instanceIds, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, null, cancellationToken).ConfigureAwait(false)).Dispose(); }