Share via


BatchClient.ReimageNodeAsync Method

Definition

Reinstalls the operating system on the specified Compute Node.

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

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
BatchNodeReimageOptions

The options to use for reimaging 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 ReimageNodeOperation 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 reinstall the operating system on a Compute Node only if it is in an idle or running state. This API can be invoked only on Pools created with the cloud service configuration property.

Applies to