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

Description

Associates a group with a continuous job. The following criteria must be met:

  • The job must have been created with the targetSelection field set to "CONTINUOUS".
  • The job status must currently be "IN_PROGRESS".
  • The total number of targets associated with a job must not exceed 100.

Requires permission to access the AssociateTargetsWithJob action.

Synopsis

Creating a Request

data AssociateTargetsWithJob Source #

See: newAssociateTargetsWithJob smart constructor.

Constructors

AssociateTargetsWithJob' 

Fields

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

  • comment :: Maybe Text

    An optional comment string describing why the job was associated with the targets.

  • targets :: NonEmpty Text

    A list of thing group ARNs that define the targets of the job.

  • jobId :: Text

    The unique identifier you assigned to this job when it was created.

Instances

Instances details
Eq AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Read AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Show AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Generic AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Associated Types

type Rep AssociateTargetsWithJob :: Type -> Type #

NFData AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Methods

rnf :: AssociateTargetsWithJob -> () #

Hashable AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

ToJSON AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

AWSRequest AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

ToHeaders AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

ToPath AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

ToQuery AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

type Rep AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

type Rep AssociateTargetsWithJob = D1 ('MetaData "AssociateTargetsWithJob" "Amazonka.IoT.AssociateTargetsWithJob" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "AssociateTargetsWithJob'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "namespaceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "comment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "targets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)) :*: S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse AssociateTargetsWithJob Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

newAssociateTargetsWithJob Source #

Create a value of AssociateTargetsWithJob 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:namespaceId:AssociateTargetsWithJob', associateTargetsWithJob_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:comment:AssociateTargetsWithJob', associateTargetsWithJob_comment - An optional comment string describing why the job was associated with the targets.

$sel:targets:AssociateTargetsWithJob', associateTargetsWithJob_targets - A list of thing group ARNs that define the targets of the job.

$sel:jobId:AssociateTargetsWithJob', associateTargetsWithJob_jobId - The unique identifier you assigned to this job when it was created.

Request Lenses

associateTargetsWithJob_namespaceId :: Lens' AssociateTargetsWithJob (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.

associateTargetsWithJob_comment :: Lens' AssociateTargetsWithJob (Maybe Text) Source #

An optional comment string describing why the job was associated with the targets.

associateTargetsWithJob_targets :: Lens' AssociateTargetsWithJob (NonEmpty Text) Source #

A list of thing group ARNs that define the targets of the job.

associateTargetsWithJob_jobId :: Lens' AssociateTargetsWithJob Text Source #

The unique identifier you assigned to this job when it was created.

Destructuring the Response

data AssociateTargetsWithJobResponse Source #

See: newAssociateTargetsWithJobResponse smart constructor.

Constructors

AssociateTargetsWithJobResponse' 

Fields

Instances

Instances details
Eq AssociateTargetsWithJobResponse Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Read AssociateTargetsWithJobResponse Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Show AssociateTargetsWithJobResponse Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Generic AssociateTargetsWithJobResponse Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

Associated Types

type Rep AssociateTargetsWithJobResponse :: Type -> Type #

NFData AssociateTargetsWithJobResponse Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

type Rep AssociateTargetsWithJobResponse Source # 
Instance details

Defined in Amazonka.IoT.AssociateTargetsWithJob

type Rep AssociateTargetsWithJobResponse = D1 ('MetaData "AssociateTargetsWithJobResponse" "Amazonka.IoT.AssociateTargetsWithJob" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "AssociateTargetsWithJobResponse'" '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))))

newAssociateTargetsWithJobResponse Source #

Create a value of AssociateTargetsWithJobResponse 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:AssociateTargetsWithJob', associateTargetsWithJobResponse_jobId - The unique identifier you assigned to this job when it was created.

$sel:jobArn:AssociateTargetsWithJobResponse', associateTargetsWithJobResponse_jobArn - An ARN identifying the job.

$sel:description:AssociateTargetsWithJobResponse', associateTargetsWithJobResponse_description - A short text description of the job.

$sel:httpStatus:AssociateTargetsWithJobResponse', associateTargetsWithJobResponse_httpStatus - The response's http status code.

Response Lenses

associateTargetsWithJobResponse_jobId :: Lens' AssociateTargetsWithJobResponse (Maybe Text) Source #

The unique identifier you assigned to this job when it was created.