Learn R Programming

paws.compute (version 0.1.12)

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 canceled. Jobs that have progressed to STARTING or RUNNING are not canceled (but the API operation still succeeds, even if no job is canceled); these jobs must be terminated with the terminate_job operation.

Usage

batch_cancel_job(jobId, reason)

Value

An empty list.

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 describe_jobs 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
if (FALSE) {
# This example cancels a job with the specified job ID.
svc$cancel_job(
  jobId = "1d828f65-7a4d-42e8-996d-3b900ed59dc4",
  reason = "Cancelling job."
)
}

Run the code above in your browser using DataLab