| Copyright | (c) 2013-2023 Brendan Hay | 
|---|---|
| License | Mozilla Public License, v. 2.0. | 
| Maintainer | Brendan Hay | 
| Stability | auto-generated | 
| Portability | non-portable (GHC extensions) | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
Amazonka.IoT.CancelJobExecution
Description
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_expectedVersion :: Lens' CancelJobExecution (Maybe Integer)
 - cancelJobExecution_force :: Lens' CancelJobExecution (Maybe Bool)
 - cancelJobExecution_statusDetails :: Lens' CancelJobExecution (Maybe (HashMap Text Text))
 - 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.
Constructors
| CancelJobExecution' | |
Fields 
  | |
Instances
newCancelJobExecution Source #
Arguments
| :: Text | |
| -> Text | |
| -> CancelJobExecution | 
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.
Constructors
| CancelJobExecutionResponse' | |
Instances
newCancelJobExecutionResponse :: CancelJobExecutionResponse Source #
Create a value of CancelJobExecutionResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.