libZSservicesZSamazonka-iotZSamazonka-iot
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

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

  • 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.)

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

Defined in Amazonka.IoT.CancelJobExecution

Read CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Show CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Generic CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Associated Types

type Rep CancelJobExecution :: Type -> Type #

NFData CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Methods

rnf :: CancelJobExecution -> () #

Hashable CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

ToJSON CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

AWSRequest CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Associated Types

type AWSResponse 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

type Rep CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

type Rep CancelJobExecution = D1 ('MetaData "CancelJobExecution" "Amazonka.IoT.CancelJobExecution" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "CancelJobExecution'" 'PrefixI 'True) ((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 "expectedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "thingName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CancelJobExecution Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

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

$sel:statusDetails: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.

$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:jobId:CancelJobExecution', cancelJobExecution_jobId - The ID of the job to be canceled.

$sel:thingName:CancelJobExecution', cancelJobExecution_thingName - The name of the thing whose execution of the job will be canceled.

Request Lenses

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_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_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
Eq CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Read CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Show CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Generic CancelJobExecutionResponse Source # 
Instance details

Defined in Amazonka.IoT.CancelJobExecution

Associated Types

type Rep CancelJobExecutionResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-iotZSamazonka-iot" '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.