JobOperationsExtensions.Terminate(IJobOperations, String, String, JobTerminateOptions) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Terminates the specified job, marking it as completed.
public static Microsoft.Azure.Batch.Protocol.Models.JobTerminateHeaders Terminate (this Microsoft.Azure.Batch.Protocol.IJobOperations operations, string jobId, string terminateReason = null, Microsoft.Azure.Batch.Protocol.Models.JobTerminateOptions jobTerminateOptions = null);
static member Terminate : Microsoft.Azure.Batch.Protocol.IJobOperations * string * string * Microsoft.Azure.Batch.Protocol.Models.JobTerminateOptions -> Microsoft.Azure.Batch.Protocol.Models.JobTerminateHeaders
Parameters
- operations
- IJobOperations
The operations group for this extension method.
- jobId
- System.String
The ID of the job to terminate.
- terminateReason
- System.String
The text you want to appear as the job's TerminateReason. The default is 'UserTerminate'.
- jobTerminateOptions
- JobTerminateOptions
Additional parameters for the operation
Returns
Remarks
When a Terminate Job request is received, the Batch service sets the job to the terminating state. The Batch service then terminates any active or running tasks associated with the job, and runs any required Job Release tasks. The job then moves into the completed state.