:doc:`IoT <../../iot>` / Client / list_job_executions_for_thing

*****************************
list_job_executions_for_thing
*****************************



.. py:method:: IoT.Client.list_job_executions_for_thing(**kwargs)

  

  Lists the job executions for the specified thing.

   

  Requires permission to access the `ListJobExecutionsForThing <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

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


  **Request Syntax**
  ::

    response = client.list_job_executions_for_thing(
        thingName='string',
        status='QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'REJECTED'|'REMOVED'|'CANCELED',
        namespaceId='string',
        maxResults=123,
        nextToken='string',
        jobId='string'
    )
    
  :type thingName: string
  :param thingName: **[REQUIRED]** 

    The thing name.

    

  
  :type status: string
  :param status: 

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

    

  
  :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 maxResults: integer
  :param maxResults: 

    The maximum number of results to be returned per request.

    

  
  :type nextToken: string
  :param nextToken: 

    The token to retrieve the next set of results.

    

  
  :type jobId: string
  :param jobId: 

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

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'executionSummaries': [
              {
                  'jobId': 'string',
                  'jobExecutionSummary': {
                      'status': 'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'REJECTED'|'REMOVED'|'CANCELED',
                      'queuedAt': datetime(2015, 1, 1),
                      'startedAt': datetime(2015, 1, 1),
                      'lastUpdatedAt': datetime(2015, 1, 1),
                      'executionNumber': 123,
                      'retryAttempt': 123
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **executionSummaries** *(list) --* 

        A list of job execution summaries.

        
        

        - *(dict) --* 

          The job execution summary for a thing.

          
          

          - **jobId** *(string) --* 

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

            
          

          - **jobExecutionSummary** *(dict) --* 

            Contains a subset of information about a job execution.

            
            

            - **status** *(string) --* 

              The status of the job execution.

              
            

            - **queuedAt** *(datetime) --* 

              The time, in seconds since the epoch, when the job execution was queued.

              
            

            - **startedAt** *(datetime) --* 

              The time, in seconds since the epoch, when the job execution started.

              
            

            - **lastUpdatedAt** *(datetime) --* 

              The time, in seconds since the epoch, when the job execution was last updated.

              
            

            - **executionNumber** *(integer) --* 

              A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used later in commands which return or update job execution information.

              
            

            - **retryAttempt** *(integer) --* 

              The number that indicates how many retry attempts have been completed for this job on this device.

              
        
      
    
      

      - **nextToken** *(string) --* 

        The token for the next set of results, or **null** if there are no additional results.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  