TaskOperationsExtensions.Terminate(ITaskOperations, String, String, TaskTerminateOptions) Method

Definition

Terminates the specified task.

public static Microsoft.Azure.Batch.Protocol.Models.TaskTerminateHeaders Terminate (this Microsoft.Azure.Batch.Protocol.ITaskOperations operations, string jobId, string taskId, Microsoft.Azure.Batch.Protocol.Models.TaskTerminateOptions taskTerminateOptions = null);
static member Terminate : Microsoft.Azure.Batch.Protocol.ITaskOperations * string * string * Microsoft.Azure.Batch.Protocol.Models.TaskTerminateOptions -> Microsoft.Azure.Batch.Protocol.Models.TaskTerminateHeaders

Parameters

operations
ITaskOperations

The operations group for this extension method.

jobId
System.String

The ID of the job containing the task.

taskId
System.String

The ID of the task to terminate.

taskTerminateOptions
TaskTerminateOptions

Additional parameters for the operation

Returns

TaskTerminateHeaders

Remarks

When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Applies to