Delen via


PoolOperationsExtensions.Delete 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 = default);
static member Delete : Microsoft.Azure.Batch.Protocol.IPoolOperations * string * Microsoft.Azure.Batch.Protocol.Models.PoolDeleteOptions -> Microsoft.Azure.Batch.Protocol.Models.PoolDeleteHeaders
<Extension()>
Public Function Delete (operations As IPoolOperations, poolId As String, Optional poolDeleteOptions As PoolDeleteOptions = Nothing) As PoolDeleteHeaders

Parameters

operations
IPoolOperations

The operations group for this extension method.

poolId
String

The ID of the Pool to delete.

poolDeleteOptions
PoolDeleteOptions

Additional parameters for the operation

Returns

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.

Applies to