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 |
Creates a job.
Requires permission to access the CreateJob action.
Synopsis
- data CreateJob = CreateJob' {
- abortConfig :: Maybe AbortConfig
- description :: Maybe Text
- document :: Maybe Text
- documentParameters :: Maybe (HashMap Text Text)
- documentSource :: Maybe Text
- jobExecutionsRetryConfig :: Maybe JobExecutionsRetryConfig
- jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
- jobTemplateArn :: Maybe Text
- namespaceId :: Maybe Text
- presignedUrlConfig :: Maybe PresignedUrlConfig
- schedulingConfig :: Maybe SchedulingConfig
- tags :: Maybe [Tag]
- targetSelection :: Maybe TargetSelection
- timeoutConfig :: Maybe TimeoutConfig
- jobId :: Text
- targets :: NonEmpty Text
- newCreateJob :: Text -> NonEmpty Text -> CreateJob
- createJob_abortConfig :: Lens' CreateJob (Maybe AbortConfig)
- createJob_description :: Lens' CreateJob (Maybe Text)
- createJob_document :: Lens' CreateJob (Maybe Text)
- createJob_documentParameters :: Lens' CreateJob (Maybe (HashMap Text Text))
- createJob_documentSource :: Lens' CreateJob (Maybe Text)
- createJob_jobExecutionsRetryConfig :: Lens' CreateJob (Maybe JobExecutionsRetryConfig)
- createJob_jobExecutionsRolloutConfig :: Lens' CreateJob (Maybe JobExecutionsRolloutConfig)
- createJob_jobTemplateArn :: Lens' CreateJob (Maybe Text)
- createJob_namespaceId :: Lens' CreateJob (Maybe Text)
- createJob_presignedUrlConfig :: Lens' CreateJob (Maybe PresignedUrlConfig)
- createJob_schedulingConfig :: Lens' CreateJob (Maybe SchedulingConfig)
- createJob_tags :: Lens' CreateJob (Maybe [Tag])
- createJob_targetSelection :: Lens' CreateJob (Maybe TargetSelection)
- createJob_timeoutConfig :: Lens' CreateJob (Maybe TimeoutConfig)
- createJob_jobId :: Lens' CreateJob Text
- createJob_targets :: Lens' CreateJob (NonEmpty Text)
- data CreateJobResponse = CreateJobResponse' {}
- newCreateJobResponse :: Int -> CreateJobResponse
- createJobResponse_description :: Lens' CreateJobResponse (Maybe Text)
- createJobResponse_jobArn :: Lens' CreateJobResponse (Maybe Text)
- createJobResponse_jobId :: 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:
CreateJob
, createJob_abortConfig
- Allows you to create the criteria to abort a job.
CreateJob
, createJob_description
- A short text description of the job.
$sel:document:CreateJob'
, createJob_document
- The job document. Required if you don't specify a value for
documentSource
.
CreateJob
, createJob_documentParameters
- Parameters of an Amazon Web Services managed template that you can
specify to create the job document.
documentParameters
can only be used when creating jobs from Amazon Web
Services managed templates. This parameter can't be used with custom
job templates or to create jobs from them.
$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.
CreateJob
, createJob_jobExecutionsRetryConfig
- Allows you to create the criteria to retry a job.
CreateJob
, createJob_jobExecutionsRolloutConfig
- Allows you to create a staged rollout of the job.
CreateJob
, createJob_jobTemplateArn
- The ARN of the job template used to create the job.
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.
CreateJob
, createJob_presignedUrlConfig
- Configuration information for pre-signed S3 URLs.
CreateJob
, createJob_schedulingConfig
- The configuration that allows you to schedule a job for a future date
and time in addition to specifying the end behavior for each job
execution.
$sel:tags:CreateJob'
, createJob_tags
- Metadata which can be used to manage the job.
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.
We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
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
.
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.
CreateJob
, createJob_targets
- A list of things and thing groups to which the job should be sent.
Request Lenses
createJob_abortConfig :: Lens' CreateJob (Maybe AbortConfig) Source #
Allows you to create the criteria to abort a job.
createJob_document :: Lens' CreateJob (Maybe Text) Source #
The job document. Required if you don't specify a value for
documentSource
.
createJob_documentParameters :: Lens' CreateJob (Maybe (HashMap Text Text)) Source #
Parameters of an Amazon Web Services managed template that you can specify to create the job document.
documentParameters
can only be used when creating jobs from Amazon Web
Services managed templates. This parameter can't be used with custom
job templates or to create jobs from them.
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_jobExecutionsRetryConfig :: Lens' CreateJob (Maybe JobExecutionsRetryConfig) Source #
Allows you to create the criteria to retry a job.
createJob_jobExecutionsRolloutConfig :: Lens' CreateJob (Maybe JobExecutionsRolloutConfig) Source #
Allows you to create a staged rollout of the job.
createJob_jobTemplateArn :: Lens' CreateJob (Maybe Text) Source #
The ARN of the job template used to create the 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_schedulingConfig :: Lens' CreateJob (Maybe SchedulingConfig) Source #
The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.
createJob_tags :: Lens' CreateJob (Maybe [Tag]) Source #
Metadata which can be used to manage 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.
We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
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_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:
CreateJob
, createJobResponse_description
- The job description.
CreateJobResponse
, createJobResponse_jobArn
- The job ARN.
CreateJob
, createJobResponse_jobId
- The unique identifier you assigned to this job.
$sel:httpStatus:CreateJobResponse'
, createJobResponse_httpStatus
- The response's http status code.
Response Lenses
createJobResponse_description :: Lens' CreateJobResponse (Maybe Text) Source #
The job description.
createJobResponse_jobArn :: Lens' CreateJobResponse (Maybe Text) Source #
The job ARN.
createJobResponse_jobId :: Lens' CreateJobResponse (Maybe Text) Source #
The unique identifier you assigned to this job.
createJobResponse_httpStatus :: Lens' CreateJobResponse Int Source #
The response's http status code.