IoT / Client / associate_targets_with_job
associate_targets_with_job#
- IoT.Client.associate_targets_with_job(**kwargs)#
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.
See also: AWS API Documentation
Request Syntax
response = client.associate_targets_with_job( targets=[ 'string', ], jobId='string', comment='string', namespaceId='string' )
- Parameters:
targets (list) –
[REQUIRED]
A list of thing group ARNs that define the targets of the job.
(string) –
jobId (string) –
[REQUIRED]
The unique identifier you assigned to this job when it was created.
comment (string) – An optional comment string describing why the job was associated with the targets.
namespaceId (string) –
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/
Note
The
namespaceId
feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
- Return type:
dict
- Returns:
Response Syntax
{ 'jobArn': 'string', 'jobId': 'string', 'description': 'string' }
Response Structure
(dict) –
jobArn (string) –
An ARN identifying the job.
jobId (string) –
The unique identifier you assigned to this job when it was created.
description (string) –
A short text description of the job.
Exceptions