PoolOperationsExtensions.Delete(IPoolOperations, String, PoolDeleteOptions) Method

Definition

Deletes a pool from the specified account.

public static Microsoft.Azure.Batch.Protocol.Models.PoolDeleteHeaders Delete (this Microsoft.Azure.Batch.Protocol.IPoolOperations operations, string poolId, Microsoft.Azure.Batch.Protocol.Models.PoolDeleteOptions poolDeleteOptions = null);
static member Delete : Microsoft.Azure.Batch.Protocol.IPoolOperations * string * Microsoft.Azure.Batch.Protocol.Models.PoolDeleteOptions -> Microsoft.Azure.Batch.Protocol.Models.PoolDeleteHeaders

Parameters

operations
IPoolOperations

The operations group for this extension method.

poolId
System.String

The ID of the pool to delete.

poolDeleteOptions
PoolDeleteOptions

Additional parameters for the operation

Returns

PoolDeleteHeaders

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 nodes; any tasks running on existing 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.

Applies to