共用方式為


PoolOperations.RemoveFromPoolAsync Method

Definition

Overloads

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

Removes the specified compute node from the specified pool.

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

Removes the specified compute node from the specified pool.

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

Removes the specified compute nodes from the specified pool.

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

Removes the specified compute nodes from the specified pool.

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

Source:
PoolOperations.cs

Removes the specified compute node from the specified pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (string poolId, 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);
member this.RemoveFromPoolAsync : string * Microsoft.Azure.Batch.ComputeNode * Nullable<Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption> * Nullable<TimeSpan> * seq<Microsoft.Azure.Batch.BatchClientBehavior> -> System.Threading.Tasks.Task
Public Function RemoveFromPoolAsync (poolId As String, computeNode As ComputeNode, Optional deallocationOption As Nullable(Of ComputeNodeDeallocationOption) = Nothing, Optional resizeTimeout As Nullable(Of TimeSpan) = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing) As Task

Parameters

poolId
String

The id of the pool.

computeNode
ComputeNode

The ComputeNode 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.

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(String, 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(String, String, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>)

Source:
PoolOperations.cs

Removes the specified compute node from the specified pool.

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

Parameters

poolId
String

The id of the pool.

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.

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(String, 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

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

Source:
PoolOperations.cs

Removes the specified compute nodes from the specified pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (string poolId, 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 : string * 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 (poolId As String, 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

poolId
String

The id of the pool.

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(String, IEnumerable<String>, Nullable<ComputeNodeDeallocationOption>, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
PoolOperations.cs

Removes the specified compute nodes from the specified pool.

public System.Threading.Tasks.Task RemoveFromPoolAsync (string poolId, 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 : string * 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 (poolId As String, 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

poolId
String

The id of the pool.

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