amazonka-iot-2.0: Amazon IoT 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.IoT.CancelJobExecution

Description

Cancels the execution of a job for a given thing.

Requires permission to access the CancelJobExecution action.

Synopsis

Creating a Request

data CancelJobExecution Source #

See: newCancelJobExecution smart constructor.

Constructors

CancelJobExecution' 

Fields

  • expectedVersion :: Maybe Integer

    (Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)

  • force :: Maybe Bool

    (Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false.

    Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

  • statusDetails :: Maybe (HashMap Text Text)

    A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.

  • jobId :: Text

    The ID of the job to be canceled.

  • thingName :: Text

    The name of the thing whose execution of the job will be canceled.

Instances

Instances details
ToJSON CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

ToHeaders CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

ToPath CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

ToQuery CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

AWSRequest CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Associated Types

type AWSResponse CancelJobExecution #

Generic CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Associated Types

type Rep CancelJobExecution :: Type -> Type #

Read CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Show CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

NFData CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Methods

rnf :: CancelJobExecution -> () #

Eq CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Hashable CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

type AWSResponse CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

type Rep CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

type Rep CancelJobExecution = D1 ('MetaData "CancelJobExecution" "Amazonka.IoT.CancelJobExecution" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "CancelJobExecution'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "expectedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "force") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "statusDetails") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "thingName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newCancelJobExecution Source #

Create a value of CancelJobExecution 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:expectedVersion:CancelJobExecution', cancelJobExecution_expectedVersion - (Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)

$sel:force:CancelJobExecution', cancelJobExecution_force - (Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false.

Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

CancelJobExecution, cancelJobExecution_statusDetails - A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.

CancelJobExecution, cancelJobExecution_jobId - The ID of the job to be canceled.

CancelJobExecution, cancelJobExecution_thingName - The name of the thing whose execution of the job will be canceled.

Request Lenses

cancelJobExecution_expectedVersion :: Lens' CancelJobExecution (Maybe Integer) Source #

(Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)

cancelJobExecution_force :: Lens' CancelJobExecution (Maybe Bool) Source #

(Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false.

Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

cancelJobExecution_statusDetails :: Lens' CancelJobExecution (Maybe (HashMap Text Text)) Source #

A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.

cancelJobExecution_jobId :: Lens' CancelJobExecution Text Source #

The ID of the job to be canceled.

cancelJobExecution_thingName :: Lens' CancelJobExecution Text Source #

The name of the thing whose execution of the job will be canceled.

Destructuring the Response

data CancelJobExecutionResponse Source #

See: newCancelJobExecutionResponse smart constructor.

Instances

Instances details
Generic CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Associated Types

type Rep CancelJobExecutionResponse :: Type -> Type #

Read CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Show CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

NFData CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Eq CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

type Rep CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

type Rep CancelJobExecutionResponse = D1 ('MetaData "CancelJobExecutionResponse" "Amazonka.IoT.CancelJobExecution" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "CancelJobExecutionResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newCancelJobExecutionResponse :: CancelJobExecutionResponse Source #

Create a value of CancelJobExecutionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.