Share via


BatchClient.RemoveNodesAsync Method

Definition

Removes Compute Nodes from the specified Pool.

public virtual System.Threading.Tasks.Task<Azure.Compute.Batch.RemoveNodesOperation> RemoveNodesAsync(string poolId, Azure.Compute.Batch.BatchNodeRemoveOptions removeOptions, TimeSpan? timeOutInSeconds = default, DateTimeOffset? ocpDate = default, Azure.RequestConditions requestConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveNodesAsync : string * Azure.Compute.Batch.BatchNodeRemoveOptions * Nullable<TimeSpan> * Nullable<DateTimeOffset> * Azure.RequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Compute.Batch.RemoveNodesOperation>
override this.RemoveNodesAsync : string * Azure.Compute.Batch.BatchNodeRemoveOptions * Nullable<TimeSpan> * Nullable<DateTimeOffset> * Azure.RequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Compute.Batch.RemoveNodesOperation>
Public Overridable Function RemoveNodesAsync (poolId As String, removeOptions As BatchNodeRemoveOptions, Optional timeOutInSeconds As Nullable(Of TimeSpan) = Nothing, Optional ocpDate As Nullable(Of DateTimeOffset) = Nothing, Optional requestConditions As RequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoveNodesOperation)

Parameters

poolId
String

The ID of the Pool to get.

removeOptions
BatchNodeRemoveOptions

The options to use for removing the node.

timeOutInSeconds
Nullable<TimeSpan>

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.".

ocpDate
Nullable<DateTimeOffset>

The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.

requestConditions
RequestConditions

The content to send as the request conditions of the request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

The RemoveNodesOperation object to allow for polling of operation status.

Exceptions

poolId or removeOptions is null.

poolId is an empty string, and was expected to be non-empty.

Remarks

This operation can only run when the allocation state of the Pool is steady. When this operation runs, the allocation state changes from steady to resizing. Each request may remove up to 100 nodes.

Applies to