Condividi tramite


CloudPool.RemoveFromPoolAsync Method

Definition

Overloads

RemoveFromPoolAsync(ComputeNode, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Removes the specified compute node from this pool.

RemoveFromPoolAsync(IEnumerable<ComputeNode>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Removes the specified compute nodes from this pool.

RemoveFromPoolAsync(IEnumerable<String>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Removes the specified compute nodes from this pool.

RemoveFromPoolAsync(String, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Removes the specified compute node from this pool.

RemoveFromPoolAsync(ComputeNode, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
CloudPool.cs

Removes the specified compute node from this pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (Microsoft.Azure.Batch.ComputeNode computeNode, Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption? deallocationOption = default, TimeSpan? resizeTimeout = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.RemoveFromPoolAsync : Microsoft.Azure.Batch.ComputeNode * Nullable<Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption> * Nullable<TimeSpan> * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RemoveFromPoolAsync (computeNode As ComputeNode, Optional deallocationOption As Nullable(Of ComputeNodeDeallocationOption) = Nothing, Optional resizeTimeout As Nullable(Of TimeSpan) = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

computeNode
ComputeNode

The ComputeNode to remove from the pool.

deallocationOption
Nullable<ComputeNodeDeallocationOption>

Specifies when nodes may be removed from the pool. The default is Requeue.

resizeTimeout
Nullable<TimeSpan>

Specifies the timeout for removal of compute nodes from the pool. The default value is 15 minutes. The minimum value is 5 minutes.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task that represents the asynchronous operation.

Remarks

If you need to remove multiple compute nodes from a pool, it is more efficient to use the RemoveFromPoolAsync(IEnumerable<ComputeNode>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken) overload.

You can only remove nodes from a pool when the AllocationState of the pool is Steady. If the pool is already resizing, an exception occurs.

When you remove nodes from a pool, the pool's AllocationState changes from Steady to Resizing.

The remove operation runs asynchronously.

Applies to

RemoveFromPoolAsync(IEnumerable<ComputeNode>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
CloudPool.cs

Removes the specified compute nodes from this pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.ComputeNode> computeNodes, Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption? deallocationOption = default, TimeSpan? resizeTimeout = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.RemoveFromPoolAsync : seq<Microsoft.Azure.Batch.ComputeNode> * Nullable<Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption> * Nullable<TimeSpan> * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RemoveFromPoolAsync (computeNodes As IEnumerable(Of ComputeNode), Optional deallocationOption As Nullable(Of ComputeNodeDeallocationOption) = Nothing, Optional resizeTimeout As Nullable(Of TimeSpan) = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

computeNodes
IEnumerable<ComputeNode>

The compute nodes to remove from the pool.

deallocationOption
Nullable<ComputeNodeDeallocationOption>

Specifies how to handle tasks already running, and when the nodes running them may be removed from the pool. The default is Requeue.

resizeTimeout
Nullable<TimeSpan>

Specifies the timeout for removal of compute nodes from the pool. The default value is 15 minutes. The minimum value is 5 minutes.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task that represents the asynchronous operation.

Remarks

You can only remove nodes from a pool when the AllocationState of the pool is Steady. If the pool is already resizing, an exception occurs.

When you remove nodes from a pool, the pool's AllocationState changes from Steady to Resizing.

The remove operation runs asynchronously.

Applies to

RemoveFromPoolAsync(IEnumerable<String>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
CloudPool.cs

Removes the specified compute nodes from this pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (System.Collections.Generic.IEnumerable<string> computeNodeIds, Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption? deallocationOption = default, TimeSpan? resizeTimeout = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.RemoveFromPoolAsync : seq<string> * Nullable<Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption> * Nullable<TimeSpan> * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RemoveFromPoolAsync (computeNodeIds As IEnumerable(Of String), Optional deallocationOption As Nullable(Of ComputeNodeDeallocationOption) = Nothing, Optional resizeTimeout As Nullable(Of TimeSpan) = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

computeNodeIds
IEnumerable<String>

The ids of the compute nodes to remove from the pool.

deallocationOption
Nullable<ComputeNodeDeallocationOption>

Specifies how to handle tasks already running, and when the nodes running them may be removed from the pool. The default is Requeue.

resizeTimeout
Nullable<TimeSpan>

Specifies the timeout for removal of compute nodes from the pool. The default value is 15 minutes. The minimum value is 5 minutes.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task that represents the asynchronous operation.

Remarks

You can only remove nodes from a pool when the AllocationState of the pool is Steady. If the pool is already resizing, an exception occurs.

When you remove nodes from a pool, the pool's AllocationState changes from Steady to Resizing.

The remove operation runs asynchronously.

Applies to

RemoveFromPoolAsync(String, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
CloudPool.cs

Removes the specified compute node from this pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (string computeNodeId, Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption? deallocationOption = default, TimeSpan? resizeTimeout = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.RemoveFromPoolAsync : string * Nullable<Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption> * Nullable<TimeSpan> * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RemoveFromPoolAsync (computeNodeId As String, Optional deallocationOption As Nullable(Of ComputeNodeDeallocationOption) = Nothing, Optional resizeTimeout As Nullable(Of TimeSpan) = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

computeNodeId
String

The id of the compute node to remove from the pool.

deallocationOption
Nullable<ComputeNodeDeallocationOption>

Specifies how to handle tasks already running, and when the nodes running them may be removed from the pool. The default is Requeue.

resizeTimeout
Nullable<TimeSpan>

Specifies the timeout for removal of compute nodes from the pool. The default value is 15 minutes. The minimum value is 5 minutes.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task that represents the asynchronous operation.

Remarks

If you need to remove multiple compute nodes from a pool, it is more efficient to use the RemoveFromPoolAsync(IEnumerable<String>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken) overload.

You can only remove nodes from a pool when the AllocationState of the pool is Steady. If the pool is already resizing, an exception occurs.

When you remove nodes from a pool, the pool's AllocationState changes from Steady to Resizing.

The remove operation runs asynchronously.

Applies to