다음을 통해 공유


TaskOperationsExtensions.Add Method

Definition

Adds a Task to the specified Job.

public static Microsoft.Azure.Batch.Protocol.Models.TaskAddHeaders Add (this Microsoft.Azure.Batch.Protocol.ITaskOperations operations, string jobId, Microsoft.Azure.Batch.Protocol.Models.TaskAddParameter task, Microsoft.Azure.Batch.Protocol.Models.TaskAddOptions taskAddOptions = default);
static member Add : Microsoft.Azure.Batch.Protocol.ITaskOperations * string * Microsoft.Azure.Batch.Protocol.Models.TaskAddParameter * Microsoft.Azure.Batch.Protocol.Models.TaskAddOptions -> Microsoft.Azure.Batch.Protocol.Models.TaskAddHeaders
<Extension()>
Public Function Add (operations As ITaskOperations, jobId As String, task As TaskAddParameter, Optional taskAddOptions As TaskAddOptions = Nothing) As TaskAddHeaders

Parameters

operations
ITaskOperations

The operations group for this extension method.

jobId
String

The ID of the Job to which the Task is to be added.

task
TaskAddParameter

The Task to be added.

taskAddOptions
TaskAddOptions

Additional parameters for the operation

Returns

Remarks

The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Applies to