다음을 통해 공유


ITaskOperations.ReactivateWithHttpMessagesAsync Method

Definition

Reactivates a Task, allowing it to run again even if its retry count has been exhausted.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.TaskReactivateHeaders>> ReactivateWithHttpMessagesAsync (string jobId, string taskId, Microsoft.Azure.Batch.Protocol.Models.TaskReactivateOptions taskReactivateOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReactivateWithHttpMessagesAsync : string * string * Microsoft.Azure.Batch.Protocol.Models.TaskReactivateOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.TaskReactivateHeaders>>
Public Function ReactivateWithHttpMessagesAsync (jobId As String, taskId As String, Optional taskReactivateOptions As TaskReactivateOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationHeaderResponse(Of TaskReactivateHeaders))

Parameters

jobId
String

The ID of the Job containing the Task.

taskId
String

The ID of the Task to reactivate.

taskReactivateOptions
TaskReactivateOptions

Additional parameters for the operation

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when a required parameter is null

Remarks

Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's state is changed to active. As the Task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a Task is reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the Job has completed (or is terminating or deleting).

Applies to