libZSservicesZSamazonka-iotZSamazonka-iot
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig

    Allows you to create a staged rollout of the job.

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

  • abortConfig :: Maybe AbortConfig

    Allows you to create criteria to abort a 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.

  • document :: Maybe Text

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

  • jobTemplateArn :: Maybe Text

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

  • description :: Maybe Text

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

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

  • tags :: Maybe [Tag]

    Metadata which can be used to manage the job.

  • 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
Eq CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Read CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Show CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Generic CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Associated Types

type Rep CreateJob :: Type -> Type #

NFData CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Methods

rnf :: CreateJob -> () #

Hashable CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

ToJSON CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

AWSRequest CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Associated Types

type AWSResponse 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

type Rep CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type Rep CreateJob = D1 ('MetaData "CreateJob" "Amazonka.IoT.CreateJob" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "CreateJob'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "jobExecutionsRolloutConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe JobExecutionsRolloutConfig)) :*: (S1 ('MetaSel ('Just "documentSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "abortConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AbortConfig)))) :*: (S1 ('MetaSel ('Just "namespaceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "presignedUrlConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PresignedUrlConfig)) :*: S1 ('MetaSel ('Just "document") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "jobTemplateArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "targetSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TargetSelection)))) :*: ((S1 ('MetaSel ('Just "timeoutConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TimeoutConfig)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag]))) :*: (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "targets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)))))))
type AWSResponse CreateJob Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

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:

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

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

Constructors

CreateJobResponse' 

Fields

Instances

Instances details
Eq CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Read CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Show CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Generic CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Associated Types

type Rep CreateJobResponse :: Type -> Type #

NFData CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

Methods

rnf :: CreateJobResponse -> () #

type Rep CreateJobResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateJob

type Rep CreateJobResponse = D1 ('MetaData "CreateJobResponse" "Amazonka.IoT.CreateJob" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "CreateJobResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "jobArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "description") '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:

$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_httpStatus :: Lens' CreateJobResponse Int Source #

The response's http status code.