| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Batch.TerminateJob
Description
Terminates a job in a job queue. Jobs that are in the STARTING or
RUNNING state are terminated, which causes them to transition to
FAILED. Jobs that have not progressed to the STARTING state are
cancelled.
Synopsis
- data TerminateJob = TerminateJob' {}
- newTerminateJob :: Text -> Text -> TerminateJob
- terminateJob_jobId :: Lens' TerminateJob Text
- terminateJob_reason :: Lens' TerminateJob Text
- data TerminateJobResponse = TerminateJobResponse' {
- httpStatus :: Int
- newTerminateJobResponse :: Int -> TerminateJobResponse
- terminateJobResponse_httpStatus :: Lens' TerminateJobResponse Int
Creating a Request
data TerminateJob Source #
Contains the parameters for TerminateJob.
See: newTerminateJob smart constructor.
Constructors
| TerminateJob' | |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> TerminateJob |
Create a value of TerminateJob with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
TerminateJob, terminateJob_jobId - The Batch job ID of the job to terminate.
TerminateJob, terminateJob_reason - 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 Batch activity logs.
Request Lenses
terminateJob_jobId :: Lens' TerminateJob Text Source #
The Batch job ID of the job to terminate.
terminateJob_reason :: Lens' TerminateJob Text Source #
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 Batch activity logs.
Destructuring the Response
data TerminateJobResponse Source #
See: newTerminateJobResponse smart constructor.
Constructors
| TerminateJobResponse' | |
Fields
| |
Instances
newTerminateJobResponse Source #
Arguments
| :: Int | |
| -> TerminateJobResponse |
Create a value of TerminateJobResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:TerminateJobResponse', terminateJobResponse_httpStatus - The response's http status code.
Response Lenses
terminateJobResponse_httpStatus :: Lens' TerminateJobResponse Int Source #
The response's http status code.