Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Cancels the execution of a job for a given thing.
Requires permission to access the CancelJobExecution action.
Synopsis
- data CancelJobExecution = CancelJobExecution' {}
- newCancelJobExecution :: Text -> Text -> CancelJobExecution
- cancelJobExecution_force :: Lens' CancelJobExecution (Maybe Bool)
- cancelJobExecution_statusDetails :: Lens' CancelJobExecution (Maybe (HashMap Text Text))
- cancelJobExecution_expectedVersion :: Lens' CancelJobExecution (Maybe Integer)
- cancelJobExecution_jobId :: Lens' CancelJobExecution Text
- cancelJobExecution_thingName :: Lens' CancelJobExecution Text
- data CancelJobExecutionResponse = CancelJobExecutionResponse' {
- newCancelJobExecutionResponse :: CancelJobExecutionResponse
Creating a Request
data CancelJobExecution Source #
See: newCancelJobExecution
smart constructor.
CancelJobExecution' | |
|
Instances
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
newCancelJobExecutionResponse :: CancelJobExecutionResponse Source #
Create a value of CancelJobExecutionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.