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 |
Derived from API version 2017-09-29
of the AWS service descriptions, licensed under Apache 2.0.
AWS IoT Jobs is a service that allows you to define a set of jobs — remote operations that are sent to and executed on one or more devices connected to AWS IoT. For example, you can define a job that instructs a set of devices to download and install application or firmware updates, reboot, rotate certificates, or perform remote troubleshooting operations.
To create a job, you make a job document which is a description of the remote operations to be performed, and you specify a list of targets that should perform the operations. The targets can be individual things, thing groups or both.
AWS IoT Jobs sends a message to inform the targets that a job is available. The target starts the execution of the job by downloading the job document, performing the operations it specifies, and reporting its progress to AWS IoT. The Jobs service provides commands to track the progress of a job on a specific target and for all the targets of the job
Synopsis
- defaultService :: Service
- _CertificateValidationException :: AsError a => Fold a ServiceError
- _InvalidRequestException :: AsError a => Fold a ServiceError
- _InvalidStateTransitionException :: AsError a => Fold a ServiceError
- _ResourceNotFoundException :: AsError a => Fold a ServiceError
- _ServiceUnavailableException :: AsError a => Fold a ServiceError
- _TerminalStateException :: AsError a => Fold a ServiceError
- _ThrottlingException :: AsError a => Fold a ServiceError
- data DescribeJobExecution = DescribeJobExecution' (Maybe Integer) (Maybe Bool) Text Text
- newDescribeJobExecution :: Text -> Text -> DescribeJobExecution
- data DescribeJobExecutionResponse = DescribeJobExecutionResponse' (Maybe JobExecution) Int
- newDescribeJobExecutionResponse :: Int -> DescribeJobExecutionResponse
- data GetPendingJobExecutions = GetPendingJobExecutions' Text
- newGetPendingJobExecutions :: Text -> GetPendingJobExecutions
- data GetPendingJobExecutionsResponse = GetPendingJobExecutionsResponse' (Maybe [JobExecutionSummary]) (Maybe [JobExecutionSummary]) Int
- newGetPendingJobExecutionsResponse :: Int -> GetPendingJobExecutionsResponse
- data StartNextPendingJobExecution = StartNextPendingJobExecution' (Maybe (HashMap Text Text)) (Maybe Integer) Text
- newStartNextPendingJobExecution :: Text -> StartNextPendingJobExecution
- data StartNextPendingJobExecutionResponse = StartNextPendingJobExecutionResponse' (Maybe JobExecution) Int
- newStartNextPendingJobExecutionResponse :: Int -> StartNextPendingJobExecutionResponse
- data UpdateJobExecution = UpdateJobExecution' (Maybe Integer) (Maybe Integer) (Maybe Bool) (Maybe Bool) (Maybe (HashMap Text Text)) (Maybe Integer) Text Text JobExecutionStatus
- newUpdateJobExecution :: Text -> Text -> JobExecutionStatus -> UpdateJobExecution
- data UpdateJobExecutionResponse = UpdateJobExecutionResponse' (Maybe JobExecutionState) (Maybe Text) Int
- newUpdateJobExecutionResponse :: Int -> UpdateJobExecutionResponse
- newtype JobExecutionStatus where
- JobExecutionStatus' { }
- pattern JobExecutionStatus_CANCELED :: JobExecutionStatus
- pattern JobExecutionStatus_FAILED :: JobExecutionStatus
- pattern JobExecutionStatus_IN_PROGRESS :: JobExecutionStatus
- pattern JobExecutionStatus_QUEUED :: JobExecutionStatus
- pattern JobExecutionStatus_REJECTED :: JobExecutionStatus
- pattern JobExecutionStatus_REMOVED :: JobExecutionStatus
- pattern JobExecutionStatus_SUCCEEDED :: JobExecutionStatus
- pattern JobExecutionStatus_TIMED_OUT :: JobExecutionStatus
- data JobExecution = JobExecution' (Maybe Integer) (Maybe Integer) (Maybe Text) (Maybe Text) (Maybe Integer) (Maybe Integer) (Maybe Integer) (Maybe JobExecutionStatus) (Maybe (HashMap Text Text)) (Maybe Text) (Maybe Integer)
- newJobExecution :: JobExecution
- data JobExecutionState = JobExecutionState' (Maybe JobExecutionStatus) (Maybe (HashMap Text Text)) (Maybe Integer)
- newJobExecutionState :: JobExecutionState
- data JobExecutionSummary = JobExecutionSummary' (Maybe Integer) (Maybe Text) (Maybe Integer) (Maybe Integer) (Maybe Integer) (Maybe Integer)
- newJobExecutionSummary :: JobExecutionSummary
Service Configuration
defaultService :: Service Source #
API version 2017-09-29
of the Amazon IoT Jobs Data Plane SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by IoTJobsData
.
CertificateValidationException
_CertificateValidationException :: AsError a => Fold a ServiceError Source #
The certificate is invalid.
InvalidRequestException
_InvalidRequestException :: AsError a => Fold a ServiceError Source #
The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.
InvalidStateTransitionException
_InvalidStateTransitionException :: AsError a => Fold a ServiceError Source #
An update attempted to change the job execution to a state that is invalid because of the job execution's current state (for example, an attempt to change a request in state SUCCESS to state IN_PROGRESS). In this case, the body of the error message also contains the executionState field.
ResourceNotFoundException
_ResourceNotFoundException :: AsError a => Fold a ServiceError Source #
The specified resource does not exist.
ServiceUnavailableException
_ServiceUnavailableException :: AsError a => Fold a ServiceError Source #
The service is temporarily unavailable.
TerminalStateException
_TerminalStateException :: AsError a => Fold a ServiceError Source #
The job is in a terminal state.
ThrottlingException
_ThrottlingException :: AsError a => Fold a ServiceError Source #
The rate exceeds the limit.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
DescribeJobExecution
data DescribeJobExecution Source #
See: newDescribeJobExecution
smart constructor.
Instances
newDescribeJobExecution Source #
Create a value of DescribeJobExecution
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:
DescribeJobExecution
, describeJobExecution_executionNumber
- Optional. A number that identifies a particular job execution on a
particular device. If not specified, the latest job execution is
returned.
$sel:includeJobDocument:DescribeJobExecution'
, describeJobExecution_includeJobDocument
- Optional. When set to true, the response contains the job document. The
default is false.
DescribeJobExecution
, describeJobExecution_jobId
- The unique identifier assigned to this job when it was created.
DescribeJobExecution
, describeJobExecution_thingName
- The thing name associated with the device the job execution is running
on.
data DescribeJobExecutionResponse Source #
See: newDescribeJobExecutionResponse
smart constructor.
Instances
newDescribeJobExecutionResponse Source #
Create a value of DescribeJobExecutionResponse
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:execution:DescribeJobExecutionResponse'
, describeJobExecutionResponse_execution
- Contains data about a job execution.
$sel:httpStatus:DescribeJobExecutionResponse'
, describeJobExecutionResponse_httpStatus
- The response's http status code.
GetPendingJobExecutions
data GetPendingJobExecutions Source #
See: newGetPendingJobExecutions
smart constructor.
Instances
newGetPendingJobExecutions Source #
Create a value of GetPendingJobExecutions
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:
GetPendingJobExecutions
, getPendingJobExecutions_thingName
- The name of the thing that is executing the job.
data GetPendingJobExecutionsResponse Source #
See: newGetPendingJobExecutionsResponse
smart constructor.
Instances
newGetPendingJobExecutionsResponse Source #
Create a value of GetPendingJobExecutionsResponse
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:inProgressJobs:GetPendingJobExecutionsResponse'
, getPendingJobExecutionsResponse_inProgressJobs
- A list of JobExecutionSummary objects with status IN_PROGRESS.
$sel:queuedJobs:GetPendingJobExecutionsResponse'
, getPendingJobExecutionsResponse_queuedJobs
- A list of JobExecutionSummary objects with status QUEUED.
$sel:httpStatus:GetPendingJobExecutionsResponse'
, getPendingJobExecutionsResponse_httpStatus
- The response's http status code.
StartNextPendingJobExecution
data StartNextPendingJobExecution Source #
See: newStartNextPendingJobExecution
smart constructor.
Instances
newStartNextPendingJobExecution Source #
Create a value of StartNextPendingJobExecution
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:
StartNextPendingJobExecution
, startNextPendingJobExecution_statusDetails
- A collection of name/value pairs that describe the status of the job
execution. If not specified, the statusDetails are unchanged.
$sel:stepTimeoutInMinutes:StartNextPendingJobExecution'
, startNextPendingJobExecution_stepTimeoutInMinutes
- Specifies the amount of time this device has to finish execution of this
job. If the job execution status is not set to a terminal state before
this timer expires, or before the timer is reset (by calling
UpdateJobExecution
, setting the status to IN_PROGRESS
and specifying
a new timeout value in field stepTimeoutInMinutes
) the job execution
status will be automatically set to TIMED_OUT
. Note that setting this
timeout has no effect on that job execution timeout which may have been
specified when the job was created (CreateJob
using field
timeoutConfig
).
StartNextPendingJobExecution
, startNextPendingJobExecution_thingName
- The name of the thing associated with the device.
data StartNextPendingJobExecutionResponse Source #
See: newStartNextPendingJobExecutionResponse
smart constructor.
Instances
newStartNextPendingJobExecutionResponse Source #
Create a value of StartNextPendingJobExecutionResponse
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:execution:StartNextPendingJobExecutionResponse'
, startNextPendingJobExecutionResponse_execution
- A JobExecution object.
$sel:httpStatus:StartNextPendingJobExecutionResponse'
, startNextPendingJobExecutionResponse_httpStatus
- The response's http status code.
UpdateJobExecution
data UpdateJobExecution Source #
See: newUpdateJobExecution
smart constructor.
UpdateJobExecution' (Maybe Integer) (Maybe Integer) (Maybe Bool) (Maybe Bool) (Maybe (HashMap Text Text)) (Maybe Integer) Text Text JobExecutionStatus |
Instances
newUpdateJobExecution Source #
:: Text | |
-> Text | |
-> JobExecutionStatus | |
-> UpdateJobExecution |
Create a value of UpdateJobExecution
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:
UpdateJobExecution
, updateJobExecution_executionNumber
- Optional. A number that identifies a particular job execution on a
particular device.
$sel:expectedVersion:UpdateJobExecution'
, updateJobExecution_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:includeJobDocument:UpdateJobExecution'
, updateJobExecution_includeJobDocument
- Optional. When set to true, the response contains the job document. The
default is false.
$sel:includeJobExecutionState:UpdateJobExecution'
, updateJobExecution_includeJobExecutionState
- Optional. When included and set to true, the response contains the
JobExecutionState data. The default is false.
UpdateJobExecution
, updateJobExecution_statusDetails
- Optional. A collection of name/value pairs that describe the status of
the job execution. If not specified, the statusDetails are unchanged.
$sel:stepTimeoutInMinutes:UpdateJobExecution'
, updateJobExecution_stepTimeoutInMinutes
- Specifies the amount of time this device has to finish execution of this
job. If the job execution status is not set to a terminal state before
this timer expires, or before the timer is reset (by again calling
UpdateJobExecution
, setting the status to IN_PROGRESS
and specifying
a new timeout value in this field) the job execution status will be
automatically set to TIMED_OUT
. Note that setting or resetting this
timeout has no effect on that job execution timeout which may have been
specified when the job was created (CreateJob
using field
timeoutConfig
).
UpdateJobExecution
, updateJobExecution_jobId
- The unique identifier assigned to this job when it was created.
UpdateJobExecution
, updateJobExecution_thingName
- The name of the thing associated with the device.
UpdateJobExecution
, updateJobExecution_status
- The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or
REJECTED). This must be specified on every update.
data UpdateJobExecutionResponse Source #
See: newUpdateJobExecutionResponse
smart constructor.
Instances
newUpdateJobExecutionResponse Source #
Create a value of UpdateJobExecutionResponse
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:executionState:UpdateJobExecutionResponse'
, updateJobExecutionResponse_executionState
- A JobExecutionState object.
UpdateJobExecutionResponse
, updateJobExecutionResponse_jobDocument
- The contents of the Job Documents.
$sel:httpStatus:UpdateJobExecutionResponse'
, updateJobExecutionResponse_httpStatus
- The response's http status code.
Types
JobExecutionStatus
newtype JobExecutionStatus Source #
pattern JobExecutionStatus_CANCELED :: JobExecutionStatus | |
pattern JobExecutionStatus_FAILED :: JobExecutionStatus | |
pattern JobExecutionStatus_IN_PROGRESS :: JobExecutionStatus | |
pattern JobExecutionStatus_QUEUED :: JobExecutionStatus | |
pattern JobExecutionStatus_REJECTED :: JobExecutionStatus | |
pattern JobExecutionStatus_REMOVED :: JobExecutionStatus | |
pattern JobExecutionStatus_SUCCEEDED :: JobExecutionStatus | |
pattern JobExecutionStatus_TIMED_OUT :: JobExecutionStatus |
Instances
JobExecution
data JobExecution Source #
Contains data about a job execution.
See: newJobExecution
smart constructor.
JobExecution' (Maybe Integer) (Maybe Integer) (Maybe Text) (Maybe Text) (Maybe Integer) (Maybe Integer) (Maybe Integer) (Maybe JobExecutionStatus) (Maybe (HashMap Text Text)) (Maybe Text) (Maybe Integer) |
Instances
newJobExecution :: JobExecution Source #
Create a value of JobExecution
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:approximateSecondsBeforeTimedOut:JobExecution'
, jobExecution_approximateSecondsBeforeTimedOut
- The estimated number of seconds that remain before the job execution
status will be changed to TIMED_OUT
.
$sel:executionNumber:JobExecution'
, jobExecution_executionNumber
- A number that identifies a particular job execution on a particular
device. It can be used later in commands that return or update job
execution information.
$sel:jobDocument:JobExecution'
, jobExecution_jobDocument
- The content of the job document.
$sel:jobId:JobExecution'
, jobExecution_jobId
- The unique identifier you assigned to this job when it was created.
$sel:lastUpdatedAt:JobExecution'
, jobExecution_lastUpdatedAt
- The time, in milliseconds since the epoch, when the job execution was
last updated.
$sel:queuedAt:JobExecution'
, jobExecution_queuedAt
- The time, in milliseconds since the epoch, when the job execution was
enqueued.
$sel:startedAt:JobExecution'
, jobExecution_startedAt
- The time, in milliseconds since the epoch, when the job execution was
started.
$sel:status:JobExecution'
, jobExecution_status
- The status of the job execution. Can be one of: "QUEUED",
"IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "REJECTED", or
"REMOVED".
$sel:statusDetails:JobExecution'
, jobExecution_statusDetails
- A collection of name/value pairs that describe the status of the job
execution.
$sel:thingName:JobExecution'
, jobExecution_thingName
- The name of the thing that is executing the job.
$sel:versionNumber:JobExecution'
, jobExecution_versionNumber
- The version of the job execution. Job execution versions are incremented
each time they are updated by a device.
JobExecutionState
data JobExecutionState Source #
Contains data about the state of a job execution.
See: newJobExecutionState
smart constructor.
Instances
newJobExecutionState :: JobExecutionState Source #
Create a value of JobExecutionState
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:status:JobExecutionState'
, jobExecutionState_status
- The status of the job execution. Can be one of: "QUEUED",
"IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "REJECTED", or
"REMOVED".
$sel:statusDetails:JobExecutionState'
, jobExecutionState_statusDetails
- A collection of name/value pairs that describe the status of the job
execution.
$sel:versionNumber:JobExecutionState'
, jobExecutionState_versionNumber
- The version of the job execution. Job execution versions are incremented
each time they are updated by a device.
JobExecutionSummary
data JobExecutionSummary Source #
Contains a subset of information about a job execution.
See: newJobExecutionSummary
smart constructor.
JobExecutionSummary' (Maybe Integer) (Maybe Text) (Maybe Integer) (Maybe Integer) (Maybe Integer) (Maybe Integer) |
Instances
newJobExecutionSummary :: JobExecutionSummary Source #
Create a value of JobExecutionSummary
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:executionNumber:JobExecutionSummary'
, jobExecutionSummary_executionNumber
- A number that identifies a particular job execution on a particular
device.
$sel:jobId:JobExecutionSummary'
, jobExecutionSummary_jobId
- The unique identifier you assigned to this job when it was created.
$sel:lastUpdatedAt:JobExecutionSummary'
, jobExecutionSummary_lastUpdatedAt
- The time, in milliseconds since the epoch, when the job execution was
last updated.
$sel:queuedAt:JobExecutionSummary'
, jobExecutionSummary_queuedAt
- The time, in milliseconds since the epoch, when the job execution was
enqueued.
$sel:startedAt:JobExecutionSummary'
, jobExecutionSummary_startedAt
- The time, in milliseconds since the epoch, when the job execution
started.
$sel:versionNumber:JobExecutionSummary'
, jobExecutionSummary_versionNumber
- The version of the job execution. Job execution versions are incremented
each time AWS IoT Jobs receives an update from a device.