paws.compute (version 0.1.0)

batch_cancel_job: Cancels a job in an AWS Batch job queue

Description

Cancels a job in an AWS Batch job queue. Jobs that are in the SUBMITTED, PENDING, or RUNNABLE state are cancelled. Jobs that have progressed to STARTING or RUNNING are not cancelled (but the API operation still succeeds, even if no job is cancelled); these jobs must be terminated with the TerminateJob operation.

Usage

batch_cancel_job(jobId, reason)

Arguments

jobId

[required] The AWS Batch job ID of the job to cancel.

reason

[required] A message to attach to the job that explains the reason for canceling it. This message is returned by future DescribeJobs operations on the job. This message is also recorded in the AWS Batch activity logs.

Request syntax

svc$cancel_job(
  jobId = "string",
  reason = "string"
)

Examples

Run this code
# NOT RUN {
# This example cancels a job with the specified job ID.
# }
# NOT RUN {
svc$cancel_job(
  jobId = "1d828f65-7a4d-42e8-996d-3b900ed59dc4",
  reason = "Cancelling job."
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace