Share via


BatchClient.DeallocateNodeAsync Method

Definition

Deallocates the specified Compute Node.

public virtual System.Threading.Tasks.Task<Azure.Compute.Batch.DeallocateNodeOperation> DeallocateNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDeallocateOptions parameters = default, TimeSpan? timeOutInSeconds = default, DateTimeOffset? ocpDate = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeallocateNodeAsync : string * string * Azure.Compute.Batch.BatchNodeDeallocateOptions * Nullable<TimeSpan> * Nullable<DateTimeOffset> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Compute.Batch.DeallocateNodeOperation>
override this.DeallocateNodeAsync : string * string * Azure.Compute.Batch.BatchNodeDeallocateOptions * Nullable<TimeSpan> * Nullable<DateTimeOffset> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Compute.Batch.DeallocateNodeOperation>
Public Overridable Function DeallocateNodeAsync (poolId As String, nodeId As String, Optional parameters As BatchNodeDeallocateOptions = Nothing, Optional timeOutInSeconds As Nullable(Of TimeSpan) = Nothing, Optional ocpDate As Nullable(Of DateTimeOffset) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DeallocateNodeOperation)

Parameters

poolId
String

The ID of the Pool that contains the Compute Node.

nodeId
String

The ID of the Compute Node that you want to restart.

parameters
BatchNodeDeallocateOptions

The options to use for deallocating the Compute 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.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

The DeallocateNodeOperation object to allow for polling of operation status.

Exceptions

poolId or nodeId is null.

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

Remarks

You can deallocate a Compute Node only if it is in an idle or running state.

Applies to