amazonka-iot-2.0: Amazon IoT SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.IoT.CreateJob

Description

Creates a job.

Requires permission to access the CreateJob action.

Synopsis

Creating a Request

data CreateJob Source #

See: newCreateJob smart constructor.

Constructors

CreateJob' 

Fields

  • abortConfig :: Maybe AbortConfig

    Allows you to create the criteria to abort a job.

  • description :: Maybe Text

    A short text description of the job.

  • document :: Maybe Text

    The job document. Required if you don't specify a value for documentSource.

  • documentParameters :: Maybe (HashMap Text Text)

    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.

  • documentSource :: Maybe Text

    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.

  • jobExecutionsRetryConfig :: Maybe JobExecutionsRetryConfig

    Allows you to create the criteria to retry a job.

  • jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig

    Allows you to create a staged rollout of the job.

  • jobTemplateArn :: Maybe Text

    The ARN of the job template used to create the job.

  • namespaceId :: Maybe Text

    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.

  • presignedUrlConfig :: Maybe PresignedUrlConfig

    Configuration information for pre-signed S3 URLs.

  • schedulingConfig :: Maybe 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.

  • tags :: Maybe [Tag]

    Metadata which can be used to manage the job.

  • targetSelection :: Maybe 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.

  • timeoutConfig :: Maybe 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.

  • jobId :: Text

    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.

  • targets :: NonEmpty Text

    A list of things and thing groups to which the job should be sent.

Instances

Instances details
ToJSON CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

ToHeaders CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Methods

toHeaders :: CreateJob -> [Header] #

ToPath CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

ToQuery CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

AWSRequest CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Associated Types

type AWSResponse CreateJob #

Generic CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Associated Types

type Rep CreateJob :: Type -> Type #

Read CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Show CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

NFData CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Methods

rnf :: CreateJob -> () #

Eq CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Hashable CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type AWSResponse CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type Rep CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type Rep CreateJob = D1 ('MetaData "CreateJob" "Amazonka.IoT.CreateJob" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "CreateJob'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "abortConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AbortConfig)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "document") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "documentParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))))) :*: ((S1 ('MetaSel ('Just "documentSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "jobExecutionsRetryConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe JobExecutionsRetryConfig))) :*: (S1 ('MetaSel ('Just "jobExecutionsRolloutConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe JobExecutionsRolloutConfig)) :*: S1 ('MetaSel ('Just "jobTemplateArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: (((S1 ('MetaSel ('Just "namespaceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "presignedUrlConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PresignedUrlConfig))) :*: (S1 ('MetaSel ('Just "schedulingConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SchedulingConfig)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])))) :*: ((S1 ('MetaSel ('Just "targetSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TargetSelection)) :*: S1 ('MetaSel ('Just "timeoutConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TimeoutConfig))) :*: (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "targets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)))))))

newCreateJob Source #

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_description :: Lens' CreateJob (Maybe Text) Source #

A short text description of the 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.

Constructors

CreateJobResponse' 

Fields

Instances

Instances details
Generic CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Associated Types

type Rep CreateJobResponse :: Type -> Type #

Read CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Show CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

NFData CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Methods

rnf :: CreateJobResponse -> () #

Eq CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type Rep CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type Rep CreateJobResponse = D1 ('MetaData "CreateJobResponse" "Amazonka.IoT.CreateJob" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "CreateJobResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "jobArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateJobResponse Source #

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_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.