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 |
Creates a job.
Requires permission to access the CreateJob action.
Synopsis
- data CreateJob = CreateJob' {
- jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
- documentSource :: Maybe Text
- abortConfig :: Maybe AbortConfig
- namespaceId :: Maybe Text
- presignedUrlConfig :: Maybe PresignedUrlConfig
- document :: Maybe Text
- jobTemplateArn :: Maybe Text
- description :: Maybe Text
- targetSelection :: Maybe TargetSelection
- timeoutConfig :: Maybe TimeoutConfig
- tags :: Maybe [Tag]
- jobId :: Text
- targets :: NonEmpty Text
- newCreateJob :: Text -> NonEmpty Text -> CreateJob
- createJob_jobExecutionsRolloutConfig :: Lens' CreateJob (Maybe JobExecutionsRolloutConfig)
- createJob_documentSource :: Lens' CreateJob (Maybe Text)
- createJob_abortConfig :: Lens' CreateJob (Maybe AbortConfig)
- createJob_namespaceId :: Lens' CreateJob (Maybe Text)
- createJob_presignedUrlConfig :: Lens' CreateJob (Maybe PresignedUrlConfig)
- createJob_document :: Lens' CreateJob (Maybe Text)
- createJob_jobTemplateArn :: Lens' CreateJob (Maybe Text)
- createJob_description :: Lens' CreateJob (Maybe Text)
- createJob_targetSelection :: Lens' CreateJob (Maybe TargetSelection)
- createJob_timeoutConfig :: Lens' CreateJob (Maybe TimeoutConfig)
- createJob_tags :: Lens' CreateJob (Maybe [Tag])
- createJob_jobId :: Lens' CreateJob Text
- createJob_targets :: Lens' CreateJob (NonEmpty Text)
- data CreateJobResponse = CreateJobResponse' {}
- newCreateJobResponse :: Int -> CreateJobResponse
- createJobResponse_jobId :: Lens' CreateJobResponse (Maybe Text)
- createJobResponse_jobArn :: Lens' CreateJobResponse (Maybe Text)
- createJobResponse_description :: Lens' CreateJobResponse (Maybe Text)
- createJobResponse_httpStatus :: Lens' CreateJobResponse Int
Creating a Request
See: newCreateJob
smart constructor.
CreateJob' | |
|
Instances
Create a value of CreateJob
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:jobExecutionsRolloutConfig:CreateJob'
, createJob_jobExecutionsRolloutConfig
- Allows you to create a staged rollout of the job.
$sel:documentSource:CreateJob'
, createJob_documentSource
- An S3 link to the job document. Required if you don't specify a value
for document
.
If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document.
The placeholder link is of the following form:
${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key}
where bucket is your bucket name and key is the object in the bucket to which you are linking.
$sel:abortConfig:CreateJob'
, createJob_abortConfig
- Allows you to create criteria to abort a job.
$sel:namespaceId:CreateJob'
, createJob_namespaceId
- The namespace used to indicate that a job is a customer-managed job.
When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.
$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
The namespaceId
feature is in public preview.
$sel:presignedUrlConfig:CreateJob'
, createJob_presignedUrlConfig
- Configuration information for pre-signed S3 URLs.
$sel:document:CreateJob'
, createJob_document
- The job document. Required if you don't specify a value for
documentSource
.
$sel:jobTemplateArn:CreateJob'
, createJob_jobTemplateArn
- The ARN of the job template used to create the job.
$sel:description:CreateJob'
, createJob_description
- A short text description of the job.
$sel:targetSelection:CreateJob'
, createJob_targetSelection
- Specifies whether the job will continue to run (CONTINUOUS), or will be
complete after all those things specified as targets have completed the
job (SNAPSHOT). If continuous, the job may also be run on a thing when a
change is detected in a target. For example, a job will run on a thing
when the thing is added to a target group, even after the job was
completed by all things originally in the group.
$sel:timeoutConfig:CreateJob'
, createJob_timeoutConfig
- Specifies the amount of time each device has to finish its execution of
the job. The timer is started when the job execution status is set to
IN_PROGRESS
. If the job execution status is not set to another
terminal state before the time expires, it will be automatically set to
TIMED_OUT
.
$sel:tags:CreateJob'
, createJob_tags
- Metadata which can be used to manage the job.
$sel:jobId:CreateJob'
, createJob_jobId
- A job identifier which must be unique for your Amazon Web Services
account. We recommend using a UUID. Alpha-numeric characters, "-" and
"_" are valid for use here.
$sel:targets:CreateJob'
, createJob_targets
- A list of things and thing groups to which the job should be sent.
Request Lenses
createJob_jobExecutionsRolloutConfig :: Lens' CreateJob (Maybe JobExecutionsRolloutConfig) Source #
Allows you to create a staged rollout of the job.
createJob_documentSource :: Lens' CreateJob (Maybe Text) Source #
An S3 link to the job document. Required if you don't specify a value
for document
.
If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document.
The placeholder link is of the following form:
${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key}
where bucket is your bucket name and key is the object in the bucket to which you are linking.
createJob_abortConfig :: Lens' CreateJob (Maybe AbortConfig) Source #
Allows you to create criteria to abort a job.
createJob_namespaceId :: Lens' CreateJob (Maybe Text) Source #
The namespace used to indicate that a job is a customer-managed job.
When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.
$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
The namespaceId
feature is in public preview.
createJob_presignedUrlConfig :: Lens' CreateJob (Maybe PresignedUrlConfig) Source #
Configuration information for pre-signed S3 URLs.
createJob_document :: Lens' CreateJob (Maybe Text) Source #
The job document. Required if you don't specify a value for
documentSource
.
createJob_jobTemplateArn :: Lens' CreateJob (Maybe Text) Source #
The ARN of the job template used to create the job.
createJob_targetSelection :: Lens' CreateJob (Maybe TargetSelection) Source #
Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.
createJob_timeoutConfig :: Lens' CreateJob (Maybe TimeoutConfig) Source #
Specifies the amount of time each device has to finish its execution of
the job. The timer is started when the job execution status is set to
IN_PROGRESS
. If the job execution status is not set to another
terminal state before the time expires, it will be automatically set to
TIMED_OUT
.
createJob_tags :: Lens' CreateJob (Maybe [Tag]) Source #
Metadata which can be used to manage the job.
createJob_jobId :: Lens' CreateJob Text Source #
A job identifier which must be unique for your Amazon Web Services account. We recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.
createJob_targets :: Lens' CreateJob (NonEmpty Text) Source #
A list of things and thing groups to which the job should be sent.
Destructuring the Response
data CreateJobResponse Source #
See: newCreateJobResponse
smart constructor.
Instances
Create a value of CreateJobResponse
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:jobId:CreateJob'
, createJobResponse_jobId
- The unique identifier you assigned to this job.
$sel:jobArn:CreateJobResponse'
, createJobResponse_jobArn
- The job ARN.
$sel:description:CreateJob'
, createJobResponse_description
- The job description.
$sel:httpStatus:CreateJobResponse'
, createJobResponse_httpStatus
- The response's http status code.
Response Lenses
createJobResponse_jobId :: Lens' CreateJobResponse (Maybe Text) Source #
The unique identifier you assigned to this job.
createJobResponse_jobArn :: Lens' CreateJobResponse (Maybe Text) Source #
The job ARN.
createJobResponse_description :: Lens' CreateJobResponse (Maybe Text) Source #
The job description.
createJobResponse_httpStatus :: Lens' CreateJobResponse Int Source #
The response's http status code.