amazonka-batch-2.0: Amazon Batch SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Creating a Request

data TerminateJob Source #

Contains the parameters for TerminateJob.

See: newTerminateJob smart constructor.

Constructors

TerminateJob' 

Fields

  • jobId :: Text

    The Batch job ID of the job to terminate.

  • reason :: Text

    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.

Instances

Instances details
ToJSON TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

ToHeaders TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

ToPath TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

ToQuery TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

AWSRequest TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Associated Types

type AWSResponse TerminateJob #

Generic TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Associated Types

type Rep TerminateJob :: Type -> Type #

Read TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Show TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

NFData TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Methods

rnf :: TerminateJob -> () #

Eq TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Hashable TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

type AWSResponse TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

type Rep TerminateJob Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

type Rep TerminateJob = D1 ('MetaData "TerminateJob" "Amazonka.Batch.TerminateJob" "amazonka-batch-2.0-Ey2VZ5obnq65VwmlrJ2r2K" 'False) (C1 ('MetaCons "TerminateJob'" 'PrefixI 'True) (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newTerminateJob Source #

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

Instances details
Generic TerminateJobResponse Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Associated Types

type Rep TerminateJobResponse :: Type -> Type #

Read TerminateJobResponse Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Show TerminateJobResponse Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

NFData TerminateJobResponse Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

Methods

rnf :: TerminateJobResponse -> () #

Eq TerminateJobResponse Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

type Rep TerminateJobResponse Source # 
Instance details

Defined in Amazonka.Batch.TerminateJob

type Rep TerminateJobResponse = D1 ('MetaData "TerminateJobResponse" "Amazonka.Batch.TerminateJob" "amazonka-batch-2.0-Ey2VZ5obnq65VwmlrJ2r2K" 'False) (C1 ('MetaCons "TerminateJobResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newTerminateJobResponse Source #

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