:doc:`IoT <../../iot>` / Paginator / ListJobs

********
ListJobs
********



.. py:class:: IoT.Paginator.ListJobs

  ::

    
    paginator = client.get_paginator('list_jobs')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`IoT.Client.list_jobs`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/ListJobs>`_    


    **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'
          }
      )
      
    :type status: string
    :param status: 

      An optional filter that lets you search for jobs that have the specified status.

      

    
    :type targetSelection: string
    :param 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.

       

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

        

      

    
    :type thingGroupName: string
    :param thingGroupName: 

      A filter that limits the returned jobs to those for the specified group.

      

    
    :type thingGroupId: string
    :param thingGroupId: 

      A filter that limits the returned jobs to those for the specified group.

      

    
    :type namespaceId: string
    :param 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/``

       

      .. note::

        

        The ``namespaceId`` feature is only supported by IoT Greengrass at this time. For more information, see `Setting up IoT Greengrass core devices. <https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html>`__

        

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      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.

        

      
    
    
    :rtype: 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.

          
    