IoT / Paginator / ListJobs
ListJobs#
- class IoT.Paginator.ListJobs#
paginator = client.get_paginator('list_jobs')
- paginate(**kwargs)#
Creates an iterator that will paginate through responses from
IoT.Client.list_jobs()
.See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( status='IN_PROGRESS'|'CANCELED'|'COMPLETED'|'DELETION_IN_PROGRESS'|'SCHEDULED', targetSelection='CONTINUOUS'|'SNAPSHOT', thingGroupName='string', thingGroupId='string', namespaceId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
status (string) – An optional filter that lets you search for jobs that have the specified status.
targetSelection (string) –
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.
Note
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.
thingGroupName (string) – A filter that limits the returned jobs to those for the specified group.
thingGroupId (string) – A filter that limits the returned jobs to those for the specified group.
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.PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextToken
will be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextToken
from a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'jobs': [ { 'jobArn': 'string', 'jobId': 'string', 'thingGroupId': 'string', 'targetSelection': 'CONTINUOUS'|'SNAPSHOT', 'status': 'IN_PROGRESS'|'CANCELED'|'COMPLETED'|'DELETION_IN_PROGRESS'|'SCHEDULED', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'completedAt': datetime(2015, 1, 1), 'isConcurrent': True|False }, ], 'NextToken': 'string' }
Response Structure
(dict) –
jobs (list) –
A list of jobs.
(dict) –
The job summary.
jobArn (string) –
The job ARN.
jobId (string) –
The unique identifier you assigned to this job when it was created.
thingGroupId (string) –
The ID of the thing group.
targetSelection (string) –
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.
Note
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.
status (string) –
The job summary status.
createdAt (datetime) –
The time, in seconds since the epoch, when the job was created.
lastUpdatedAt (datetime) –
The time, in seconds since the epoch, when the job was last updated.
completedAt (datetime) –
The time, in seconds since the epoch, when the job completed.
isConcurrent (boolean) –
Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.
NextToken (string) –
A token to resume pagination.