Create a Task.
Reference to the service client.
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.
The ID of the job to which the task is to be added.
The task to be added.
Promise<Models.TaskAddResponse>
The ID of the job to which the task is to be added.
The task to be added.
The callback
The ID of the job to which the task is to be added.
The task to be added.
The optional parameters
The callback
Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. 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.
The ID of the job to which the task collection is to be added.
The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
Promise<Models.TaskAddCollectionResponse>
The ID of the job to which the task collection is to be added.
The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
The callback
The ID of the job to which the task collection is to be added.
The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
The optional parameters
The callback
When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.
The ID of the job from which to delete the task.
The ID of the task to delete.
Promise<Models.TaskDeleteResponse>
The ID of the job from which to delete the task.
The ID of the task to delete.
The callback
The ID of the job from which to delete the task.
The ID of the task to delete.
The optional parameters
The callback
For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.
The ID of the job that contains the task.
The ID of the task to get information about.
Promise<Models.TaskGetResponse>
The ID of the job that contains the task.
The ID of the task to get information about.
The callback
The ID of the job that contains the task.
The ID of the task to get information about.
The optional parameters
The callback
For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.
The ID of the job.
Promise<Models.TaskListResponse>
The ID of the job.
The callback
The ID of the job.
The optional parameters
The callback
For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.
The NextLink from the previous successful call to List operation.
Promise<Models.TaskListResponse>
The NextLink from the previous successful call to List operation.
The callback
The NextLink from the previous successful call to List operation.
The optional parameters
The callback
If the task is not a multi-instance task then this returns an empty collection.
The ID of the job.
The ID of the task.
Promise<Models.TaskListSubtasksResponse>
The ID of the job.
The ID of the task.
The callback
The ID of the job.
The ID of the task.
The optional parameters
The callback
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).
The ID of the job containing the task.
The ID of the task to reactivate.
Promise<Models.TaskReactivateResponse>
The ID of the job containing the task.
The ID of the task to reactivate.
The callback
The ID of the job containing the task.
The ID of the task to reactivate.
The optional parameters
The callback
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.
The ID of the job containing the task.
The ID of the task to terminate.
Promise<Models.TaskTerminateResponse>
The ID of the job containing the task.
The ID of the task to terminate.
The callback
The ID of the job containing the task.
The ID of the task to terminate.
The optional parameters
The callback
Updates the properties of the specified task.
The ID of the job containing the task.
The ID of the task to update.
Promise<Models.TaskUpdateResponse>
The ID of the job containing the task.
The ID of the task to update.
The callback
The ID of the job containing the task.
The ID of the task to update.
The optional parameters
The callback
Generated using TypeDoc
Class representing a Task.