v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1424200374.6 KB

Cancels a job in an Batch job queue. Jobs that are in the SUBMITTED or PENDING are canceled. A job inRUNNABLE remains in RUNNABLE until it reaches the head of the job queue. Then the job status is updated to FAILED.

Jobs that progressed to the STARTING or RUNNING state aren't canceled. However, the API operation still succeeds, even if no job is canceled. These jobs must be terminated with the TerminateJob operation.

post/v1/canceljob

Request body

jobIdstring required

The Batch job ID of the job to cancel.

reasonstring required

A message to attach to the job that explains the reason for canceling it. This message is returned by future <a>DescribeJobs</a> operations on the job. This message is also recorded in the Batch activity logs.

Response

Success

CancelJobResponse required

Example response

{}
All 24 operations