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.CancelJob

Description

Cancels a job in an Batch job queue. Jobs that are in the SUBMITTED, PENDING, or RUNNABLE state are canceled. Jobs that progressed to the STARTING or RUNNING state aren't canceled. However, the API operation still succeeds, even if no job is canceled. These jobs must be terminated with the TerminateJob operation.

Synopsis

Creating a Request

data CancelJob Source #

Contains the parameters for CancelJob.

See: newCancelJob smart constructor.

Constructors

CancelJob' 

Fields

  • jobId :: Text

    The Batch job ID of the job to cancel.

  • 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 CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

ToHeaders CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Methods

toHeaders :: CancelJob -> [Header] #

ToPath CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

ToQuery CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

AWSRequest CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Associated Types

type AWSResponse CancelJob #

Generic CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Associated Types

type Rep CancelJob :: Type -> Type #

Read CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Show CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

NFData CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Methods

rnf :: CancelJob -> () #

Eq CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Hashable CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

type AWSResponse CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

type Rep CancelJob Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

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

newCancelJob Source #

Create a value of CancelJob 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:

CancelJob, cancelJob_jobId - The Batch job ID of the job to cancel.

CancelJob, cancelJob_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

cancelJob_jobId :: Lens' CancelJob Text Source #

The Batch job ID of the job to cancel.

cancelJob_reason :: Lens' CancelJob 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 CancelJobResponse Source #

See: newCancelJobResponse smart constructor.

Constructors

CancelJobResponse' 

Fields

Instances

Instances details
Generic CancelJobResponse Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Associated Types

type Rep CancelJobResponse :: Type -> Type #

Read CancelJobResponse Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Show CancelJobResponse Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

NFData CancelJobResponse Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

Methods

rnf :: CancelJobResponse -> () #

Eq CancelJobResponse Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

type Rep CancelJobResponse Source # 
Instance details

Defined in Amazonka.Batch.CancelJob

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

newCancelJobResponse Source #

Create a value of CancelJobResponse 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:CancelJobResponse', cancelJobResponse_httpStatus - The response's http status code.

Response Lenses

cancelJobResponse_httpStatus :: Lens' CancelJobResponse Int Source #

The response's http status code.