Share via


Job class

Class representing a Job.

Constructors

Job(BatchServiceClientContext)

Create a Job.

Methods

add(JobAddParameter, JobAddOptionalParams)

The Batch service supports two ways to control the work done as part of a Job. In the first approach, the user specifies a Job Manager Task. The Batch service launches this Task when it is ready to start the Job. The Job Manager Task controls all other Tasks that run under this Job, by using the Task APIs. In the second approach, the user directly controls the execution of Tasks under an active Job, by using the Task APIs. Also note: when naming Jobs, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.

add(JobAddParameter, JobAddOptionalParams, ServiceCallback<void>)
add(JobAddParameter, ServiceCallback<void>)
deleteMethod(string, JobDeleteMethodOptionalParams)

Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task data; that is, if the Job contains Tasks which are still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and all their contents. When a Delete Job request is received, the Batch service sets the Job to the deleting state. All update operations on a Job that is in deleting state will fail with status code 409 (Conflict), with additional information indicating that the Job is being deleted.

deleteMethod(string, JobDeleteMethodOptionalParams, ServiceCallback<void>)
deleteMethod(string, ServiceCallback<void>)
disable(string, DisableJobOption, JobDisableOptionalParams)

The Batch Service immediately moves the Job to the disabling state. Batch then uses the disableTasks parameter to determine what to do with the currently running Tasks of the Job. The Job remains in the disabling state until the disable operation is completed and all Tasks have been dealt with according to the disableTasks option; the Job then moves to the disabled state. No new Tasks are started under the Job until it moves back to active state. If you try to disable a Job that is in any state other than active, disabling, or disabled, the request fails with status code 409.

disable(string, DisableJobOption, JobDisableOptionalParams, ServiceCallback<void>)
disable(string, DisableJobOption, ServiceCallback<void>)
enable(string, JobEnableOptionalParams)

When you call this API, the Batch service sets a disabled Job to the enabling state. After the this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run.

enable(string, JobEnableOptionalParams, ServiceCallback<void>)
enable(string, ServiceCallback<void>)
get(string, JobGetOptionalParams)
get(string, JobGetOptionalParams, ServiceCallback<CloudJob>)
get(string, ServiceCallback<CloudJob>)
getAllLifetimeStatistics(JobGetAllLifetimeStatisticsOptionalParams)

Statistics are aggregated across all Jobs that have ever existed in the Account, from Account creation to the last update time of the statistics. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.

getAllLifetimeStatistics(JobGetAllLifetimeStatisticsOptionalParams, ServiceCallback<JobStatistics>)
getAllLifetimeStatistics(ServiceCallback<JobStatistics>)
getTaskCounts(string, JobGetTaskCountsOptionalParams)

Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.

getTaskCounts(string, JobGetTaskCountsOptionalParams, ServiceCallback<TaskCountsResult>)
getTaskCounts(string, ServiceCallback<TaskCountsResult>)
list(JobListOptionalParams)
list(JobListOptionalParams, ServiceCallback<CloudJobListResult>)
list(ServiceCallback<CloudJobListResult>)
listFromJobSchedule(string, JobListFromJobScheduleOptionalParams)
listFromJobSchedule(string, JobListFromJobScheduleOptionalParams, ServiceCallback<CloudJobListResult>)
listFromJobSchedule(string, ServiceCallback<CloudJobListResult>)
listFromJobScheduleNext(string, JobListFromJobScheduleNextOptionalParams)
listFromJobScheduleNext(string, JobListFromJobScheduleNextOptionalParams, ServiceCallback<CloudJobListResult>)
listFromJobScheduleNext(string, ServiceCallback<CloudJobListResult>)
listNext(string, JobListNextOptionalParams)
listNext(string, JobListNextOptionalParams, ServiceCallback<CloudJobListResult>)
listNext(string, ServiceCallback<CloudJobListResult>)
listPreparationAndReleaseTaskStatus(string, JobListPreparationAndReleaseTaskStatusOptionalParams)

This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.

listPreparationAndReleaseTaskStatus(string, JobListPreparationAndReleaseTaskStatusOptionalParams, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)
listPreparationAndReleaseTaskStatus(string, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)
listPreparationAndReleaseTaskStatusNext(string, JobListPreparationAndReleaseTaskStatusNextOptionalParams)

This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.

listPreparationAndReleaseTaskStatusNext(string, JobListPreparationAndReleaseTaskStatusNextOptionalParams, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)
listPreparationAndReleaseTaskStatusNext(string, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)
patch(string, JobPatchParameter, JobPatchOptionalParams)

This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints.

patch(string, JobPatchParameter, JobPatchOptionalParams, ServiceCallback<void>)
patch(string, JobPatchParameter, ServiceCallback<void>)
terminate(string, JobTerminateOptionalParams)

When a Terminate Job request is received, the Batch service sets the Job to the terminating state. The Batch service then terminates any running Tasks associated with the Job and runs any required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks in the Job in the active state, they will remain in the active state. Once a Job is terminated, new Tasks cannot be added and any remaining active Tasks will not be scheduled.

terminate(string, JobTerminateOptionalParams, ServiceCallback<void>)
terminate(string, ServiceCallback<void>)
update(string, JobUpdateParameter, JobUpdateOptionalParams)

This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints.

update(string, JobUpdateParameter, JobUpdateOptionalParams, ServiceCallback<void>)
update(string, JobUpdateParameter, ServiceCallback<void>)

Constructor Details

Job(BatchServiceClientContext)

Create a Job.

new Job(client: BatchServiceClientContext)

Parameters

client
BatchServiceClientContext

Reference to the service client.

Method Details

add(JobAddParameter, JobAddOptionalParams)

The Batch service supports two ways to control the work done as part of a Job. In the first approach, the user specifies a Job Manager Task. The Batch service launches this Task when it is ready to start the Job. The Job Manager Task controls all other Tasks that run under this Job, by using the Task APIs. In the second approach, the user directly controls the execution of Tasks under an active Job, by using the Task APIs. Also note: when naming Jobs, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.

function add(job: JobAddParameter, options?: JobAddOptionalParams): Promise<JobAddResponse>

Parameters

job
JobAddParameter

The Job to be added.

options
JobAddOptionalParams

The optional parameters

Returns

Promise<JobAddResponse>

Promise<Models.JobAddResponse>

add(JobAddParameter, JobAddOptionalParams, ServiceCallback<void>)

function add(job: JobAddParameter, options: JobAddOptionalParams, callback: ServiceCallback<void>)

Parameters

job
JobAddParameter

The Job to be added.

options
JobAddOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

add(JobAddParameter, ServiceCallback<void>)

function add(job: JobAddParameter, callback: ServiceCallback<void>)

Parameters

job
JobAddParameter

The Job to be added.

callback

ServiceCallback<void>

The callback

deleteMethod(string, JobDeleteMethodOptionalParams)

Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task data; that is, if the Job contains Tasks which are still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and all their contents. When a Delete Job request is received, the Batch service sets the Job to the deleting state. All update operations on a Job that is in deleting state will fail with status code 409 (Conflict), with additional information indicating that the Job is being deleted.

function deleteMethod(jobId: string, options?: JobDeleteMethodOptionalParams): Promise<JobDeleteResponse>

Parameters

jobId

string

The ID of the Job to delete.

options
JobDeleteMethodOptionalParams

The optional parameters

Returns

Promise<Models.JobDeleteResponse>

deleteMethod(string, JobDeleteMethodOptionalParams, ServiceCallback<void>)

function deleteMethod(jobId: string, options: JobDeleteMethodOptionalParams, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to delete.

options
JobDeleteMethodOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

deleteMethod(string, ServiceCallback<void>)

function deleteMethod(jobId: string, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to delete.

callback

ServiceCallback<void>

The callback

disable(string, DisableJobOption, JobDisableOptionalParams)

The Batch Service immediately moves the Job to the disabling state. Batch then uses the disableTasks parameter to determine what to do with the currently running Tasks of the Job. The Job remains in the disabling state until the disable operation is completed and all Tasks have been dealt with according to the disableTasks option; the Job then moves to the disabled state. No new Tasks are started under the Job until it moves back to active state. If you try to disable a Job that is in any state other than active, disabling, or disabled, the request fails with status code 409.

function disable(jobId: string, disableTasks: DisableJobOption, options?: JobDisableOptionalParams): Promise<JobDisableResponse>

Parameters

jobId

string

The ID of the Job to disable.

disableTasks
DisableJobOption

What to do with active Tasks associated with the Job. Possible values include: 'requeue', 'terminate', 'wait'

options
JobDisableOptionalParams

The optional parameters

Returns

Promise<Models.JobDisableResponse>

disable(string, DisableJobOption, JobDisableOptionalParams, ServiceCallback<void>)

function disable(jobId: string, disableTasks: DisableJobOption, options: JobDisableOptionalParams, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to disable.

disableTasks
DisableJobOption

What to do with active Tasks associated with the Job. Possible values include: 'requeue', 'terminate', 'wait'

options
JobDisableOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

disable(string, DisableJobOption, ServiceCallback<void>)

function disable(jobId: string, disableTasks: DisableJobOption, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to disable.

disableTasks
DisableJobOption

What to do with active Tasks associated with the Job. Possible values include: 'requeue', 'terminate', 'wait'

callback

ServiceCallback<void>

The callback

enable(string, JobEnableOptionalParams)

When you call this API, the Batch service sets a disabled Job to the enabling state. After the this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run.

function enable(jobId: string, options?: JobEnableOptionalParams): Promise<JobEnableResponse>

Parameters

jobId

string

The ID of the Job to enable.

options
JobEnableOptionalParams

The optional parameters

Returns

Promise<Models.JobEnableResponse>

enable(string, JobEnableOptionalParams, ServiceCallback<void>)

function enable(jobId: string, options: JobEnableOptionalParams, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to enable.

options
JobEnableOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

enable(string, ServiceCallback<void>)

function enable(jobId: string, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to enable.

callback

ServiceCallback<void>

The callback

get(string, JobGetOptionalParams)

function get(jobId: string, options?: JobGetOptionalParams): Promise<JobGetResponse>

Parameters

jobId

string

The ID of the Job.

options
JobGetOptionalParams

The optional parameters

Returns

Promise<JobGetResponse>

Promise<Models.JobGetResponse>

get(string, JobGetOptionalParams, ServiceCallback<CloudJob>)

function get(jobId: string, options: JobGetOptionalParams, callback: ServiceCallback<CloudJob>)

Parameters

jobId

string

The ID of the Job.

options
JobGetOptionalParams

The optional parameters

callback

ServiceCallback<CloudJob>

The callback

get(string, ServiceCallback<CloudJob>)

function get(jobId: string, callback: ServiceCallback<CloudJob>)

Parameters

jobId

string

The ID of the Job.

callback

ServiceCallback<CloudJob>

The callback

getAllLifetimeStatistics(JobGetAllLifetimeStatisticsOptionalParams)

Statistics are aggregated across all Jobs that have ever existed in the Account, from Account creation to the last update time of the statistics. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.

function getAllLifetimeStatistics(options?: JobGetAllLifetimeStatisticsOptionalParams): Promise<JobGetAllLifetimeStatisticsResponse>

Parameters

options
JobGetAllLifetimeStatisticsOptionalParams

The optional parameters

Returns

Promise<Models.JobGetAllLifetimeStatisticsResponse>

getAllLifetimeStatistics(JobGetAllLifetimeStatisticsOptionalParams, ServiceCallback<JobStatistics>)

function getAllLifetimeStatistics(options: JobGetAllLifetimeStatisticsOptionalParams, callback: ServiceCallback<JobStatistics>)

Parameters

options
JobGetAllLifetimeStatisticsOptionalParams

The optional parameters

callback

ServiceCallback<JobStatistics>

The callback

getAllLifetimeStatistics(ServiceCallback<JobStatistics>)

function getAllLifetimeStatistics(callback: ServiceCallback<JobStatistics>)

Parameters

callback

ServiceCallback<JobStatistics>

The callback

getTaskCounts(string, JobGetTaskCountsOptionalParams)

Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.

function getTaskCounts(jobId: string, options?: JobGetTaskCountsOptionalParams): Promise<JobGetTaskCountsResponse>

Parameters

jobId

string

The ID of the Job.

options
JobGetTaskCountsOptionalParams

The optional parameters

Returns

Promise<Models.JobGetTaskCountsResponse>

getTaskCounts(string, JobGetTaskCountsOptionalParams, ServiceCallback<TaskCountsResult>)

function getTaskCounts(jobId: string, options: JobGetTaskCountsOptionalParams, callback: ServiceCallback<TaskCountsResult>)

Parameters

jobId

string

The ID of the Job.

options
JobGetTaskCountsOptionalParams

The optional parameters

callback

ServiceCallback<TaskCountsResult>

The callback

getTaskCounts(string, ServiceCallback<TaskCountsResult>)

function getTaskCounts(jobId: string, callback: ServiceCallback<TaskCountsResult>)

Parameters

jobId

string

The ID of the Job.

callback

ServiceCallback<TaskCountsResult>

The callback

list(JobListOptionalParams)

function list(options?: JobListOptionalParams): Promise<JobListResponse>

Parameters

options
JobListOptionalParams

The optional parameters

Returns

Promise<JobListResponse>

Promise<Models.JobListResponse>

list(JobListOptionalParams, ServiceCallback<CloudJobListResult>)

function list(options: JobListOptionalParams, callback: ServiceCallback<CloudJobListResult>)

Parameters

options
JobListOptionalParams

The optional parameters

callback

ServiceCallback<CloudJobListResult>

The callback

list(ServiceCallback<CloudJobListResult>)

function list(callback: ServiceCallback<CloudJobListResult>)

Parameters

callback

ServiceCallback<CloudJobListResult>

The callback

listFromJobSchedule(string, JobListFromJobScheduleOptionalParams)

function listFromJobSchedule(jobScheduleId: string, options?: JobListFromJobScheduleOptionalParams): Promise<JobListFromJobScheduleResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule from which you want to get a list of Jobs.

options
JobListFromJobScheduleOptionalParams

The optional parameters

Returns

Promise<Models.JobListFromJobScheduleResponse>

listFromJobSchedule(string, JobListFromJobScheduleOptionalParams, ServiceCallback<CloudJobListResult>)

function listFromJobSchedule(jobScheduleId: string, options: JobListFromJobScheduleOptionalParams, callback: ServiceCallback<CloudJobListResult>)

Parameters

jobScheduleId

string

The ID of the Job Schedule from which you want to get a list of Jobs.

options
JobListFromJobScheduleOptionalParams

The optional parameters

callback

ServiceCallback<CloudJobListResult>

The callback

listFromJobSchedule(string, ServiceCallback<CloudJobListResult>)

function listFromJobSchedule(jobScheduleId: string, callback: ServiceCallback<CloudJobListResult>)

Parameters

jobScheduleId

string

The ID of the Job Schedule from which you want to get a list of Jobs.

callback

ServiceCallback<CloudJobListResult>

The callback

listFromJobScheduleNext(string, JobListFromJobScheduleNextOptionalParams)

function listFromJobScheduleNext(nextPageLink: string, options?: JobListFromJobScheduleNextOptionalParams): Promise<JobListFromJobScheduleResponse>

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
JobListFromJobScheduleNextOptionalParams

The optional parameters

Returns

Promise<Models.JobListFromJobScheduleResponse>

listFromJobScheduleNext(string, JobListFromJobScheduleNextOptionalParams, ServiceCallback<CloudJobListResult>)

function listFromJobScheduleNext(nextPageLink: string, options: JobListFromJobScheduleNextOptionalParams, callback: ServiceCallback<CloudJobListResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
JobListFromJobScheduleNextOptionalParams

The optional parameters

callback

ServiceCallback<CloudJobListResult>

The callback

listFromJobScheduleNext(string, ServiceCallback<CloudJobListResult>)

function listFromJobScheduleNext(nextPageLink: string, callback: ServiceCallback<CloudJobListResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

callback

ServiceCallback<CloudJobListResult>

The callback

listNext(string, JobListNextOptionalParams)

function listNext(nextPageLink: string, options?: JobListNextOptionalParams): Promise<JobListResponse>

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
JobListNextOptionalParams

The optional parameters

Returns

Promise<JobListResponse>

Promise<Models.JobListResponse>

listNext(string, JobListNextOptionalParams, ServiceCallback<CloudJobListResult>)

function listNext(nextPageLink: string, options: JobListNextOptionalParams, callback: ServiceCallback<CloudJobListResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
JobListNextOptionalParams

The optional parameters

callback

ServiceCallback<CloudJobListResult>

The callback

listNext(string, ServiceCallback<CloudJobListResult>)

function listNext(nextPageLink: string, callback: ServiceCallback<CloudJobListResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

callback

ServiceCallback<CloudJobListResult>

The callback

listPreparationAndReleaseTaskStatus(string, JobListPreparationAndReleaseTaskStatusOptionalParams)

This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.

function listPreparationAndReleaseTaskStatus(jobId: string, options?: JobListPreparationAndReleaseTaskStatusOptionalParams): Promise<JobListPreparationAndReleaseTaskStatusResponse>

Parameters

jobId

string

The ID of the Job.

Returns

Promise<Models.JobListPreparationAndReleaseTaskStatusResponse>

listPreparationAndReleaseTaskStatus(string, JobListPreparationAndReleaseTaskStatusOptionalParams, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

function listPreparationAndReleaseTaskStatus(jobId: string, options: JobListPreparationAndReleaseTaskStatusOptionalParams, callback: ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

Parameters

jobId

string

The ID of the Job.

listPreparationAndReleaseTaskStatus(string, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

function listPreparationAndReleaseTaskStatus(jobId: string, callback: ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

Parameters

jobId

string

The ID of the Job.

listPreparationAndReleaseTaskStatusNext(string, JobListPreparationAndReleaseTaskStatusNextOptionalParams)

This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.

function listPreparationAndReleaseTaskStatusNext(nextPageLink: string, options?: JobListPreparationAndReleaseTaskStatusNextOptionalParams): Promise<JobListPreparationAndReleaseTaskStatusResponse>

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

Returns

Promise<Models.JobListPreparationAndReleaseTaskStatusResponse>

listPreparationAndReleaseTaskStatusNext(string, JobListPreparationAndReleaseTaskStatusNextOptionalParams, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

function listPreparationAndReleaseTaskStatusNext(nextPageLink: string, options: JobListPreparationAndReleaseTaskStatusNextOptionalParams, callback: ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

listPreparationAndReleaseTaskStatusNext(string, ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

function listPreparationAndReleaseTaskStatusNext(nextPageLink: string, callback: ServiceCallback<CloudJobListPreparationAndReleaseTaskStatusResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

patch(string, JobPatchParameter, JobPatchOptionalParams)

This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints.

function patch(jobId: string, jobPatchParameter: JobPatchParameter, options?: JobPatchOptionalParams): Promise<JobPatchResponse>

Parameters

jobId

string

The ID of the Job whose properties you want to update.

jobPatchParameter
JobPatchParameter

The parameters for the request.

options
JobPatchOptionalParams

The optional parameters

Returns

Promise<JobPatchResponse>

Promise<Models.JobPatchResponse>

patch(string, JobPatchParameter, JobPatchOptionalParams, ServiceCallback<void>)

function patch(jobId: string, jobPatchParameter: JobPatchParameter, options: JobPatchOptionalParams, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job whose properties you want to update.

jobPatchParameter
JobPatchParameter

The parameters for the request.

options
JobPatchOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

patch(string, JobPatchParameter, ServiceCallback<void>)

function patch(jobId: string, jobPatchParameter: JobPatchParameter, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job whose properties you want to update.

jobPatchParameter
JobPatchParameter

The parameters for the request.

callback

ServiceCallback<void>

The callback

terminate(string, JobTerminateOptionalParams)

When a Terminate Job request is received, the Batch service sets the Job to the terminating state. The Batch service then terminates any running Tasks associated with the Job and runs any required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks in the Job in the active state, they will remain in the active state. Once a Job is terminated, new Tasks cannot be added and any remaining active Tasks will not be scheduled.

function terminate(jobId: string, options?: JobTerminateOptionalParams): Promise<JobTerminateResponse>

Parameters

jobId

string

The ID of the Job to terminate.

options
JobTerminateOptionalParams

The optional parameters

Returns

Promise<Models.JobTerminateResponse>

terminate(string, JobTerminateOptionalParams, ServiceCallback<void>)

function terminate(jobId: string, options: JobTerminateOptionalParams, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to terminate.

options
JobTerminateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

terminate(string, ServiceCallback<void>)

function terminate(jobId: string, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job to terminate.

callback

ServiceCallback<void>

The callback

update(string, JobUpdateParameter, JobUpdateOptionalParams)

This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints.

function update(jobId: string, jobUpdateParameter: JobUpdateParameter, options?: JobUpdateOptionalParams): Promise<JobUpdateResponse>

Parameters

jobId

string

The ID of the Job whose properties you want to update.

jobUpdateParameter
JobUpdateParameter

The parameters for the request.

options
JobUpdateOptionalParams

The optional parameters

Returns

Promise<Models.JobUpdateResponse>

update(string, JobUpdateParameter, JobUpdateOptionalParams, ServiceCallback<void>)

function update(jobId: string, jobUpdateParameter: JobUpdateParameter, options: JobUpdateOptionalParams, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job whose properties you want to update.

jobUpdateParameter
JobUpdateParameter

The parameters for the request.

options
JobUpdateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

update(string, JobUpdateParameter, ServiceCallback<void>)

function update(jobId: string, jobUpdateParameter: JobUpdateParameter, callback: ServiceCallback<void>)

Parameters

jobId

string

The ID of the Job whose properties you want to update.

jobUpdateParameter
JobUpdateParameter

The parameters for the request.

callback

ServiceCallback<void>

The callback