Пример #1
0
 /// <summary>
 /// Deletes a Pool from the specified Account.
 /// </summary>
 /// <remarks>
 /// When you request that a Pool be deleted, the following actions occur: the
 /// Pool state is set to deleting; any ongoing resize operation on the Pool are
 /// stopped; the Batch service starts resizing the Pool to zero Compute Nodes;
 /// any Tasks running on existing Compute Nodes are terminated and requeued (as
 /// if a resize Pool operation had been requested with the default requeue
 /// option); finally, the Pool is removed from the system. Because running
 /// Tasks are requeued, the user can rerun these Tasks by updating their Job to
 /// target a different Pool. The Tasks can then run on the new Pool. If you
 /// want to override the requeue behavior, then you should call resize Pool
 /// explicitly to shrink the Pool to zero size before deleting the Pool. If you
 /// call an Update, Patch or Delete API on a Pool in the deleting state, it
 /// will fail with HTTP status code 409 with error code PoolBeingDeleted.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool to delete.
 /// </param>
 /// <param name='poolDeleteOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolDeleteHeaders> DeleteAsync(this IPoolOperations operations, string poolId, PoolDeleteOptions poolDeleteOptions = default(PoolDeleteOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(poolId, poolDeleteOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Deletes the specified pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the Batch account.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Batch account.
 /// </param>
 /// <param name='poolName'>
 /// The pool name. This must be unique within the account.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PoolDeleteHeaders> DeleteAsync(this IPoolOperations operations, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, poolName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }