% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/batch_operations.R
\name{batch_cancel_job}
\alias{batch_cancel_job}
\title{Cancels a job in an AWS Batch job queue}
\usage{
batch_cancel_job(jobId, reason)
}
\arguments{
\item{jobId}{[required] The AWS Batch job ID of the job to cancel.}

\item{reason}{[required] A message to attach to the job that explains the reason for canceling
it. This message is returned by future
\code{\link[=batch_describe_jobs]{describe_jobs}} operations on the job. This
message is also recorded in the AWS Batch activity logs.}
}
\value{
An empty list.
}
\description{
Cancels a job in an AWS Batch job queue. Jobs that are in the
\code{SUBMITTED}, \code{PENDING}, or \code{RUNNABLE} state are canceled. Jobs that have
progressed to \code{STARTING} or \code{RUNNING} are not canceled (but the API
operation still succeeds, even if no job is canceled); these jobs must
be terminated with the \code{\link[=batch_terminate_job]{terminate_job}} operation.
}
\section{Request syntax}{
\preformatted{svc$cancel_job(
  jobId = "string",
  reason = "string"
)
}
}

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

}
\keyword{internal}
