:doc:`IoTJobsDataPlane <../../iot-jobs-data>` / Client / describe_job_execution

**********************
describe_job_execution
**********************



.. py:method:: IoTJobsDataPlane.Client.describe_job_execution(**kwargs)

  

  Gets details of a job execution.

   

  Requires permission to access the `DescribeJobExecution <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-jobs-data-2017-09-29/DescribeJobExecution>`_  


  **Request Syntax**
  ::

    response = client.describe_job_execution(
        jobId='string',
        thingName='string',
        includeJobDocument=True|False,
        executionNumber=123
    )
    
  :type jobId: string
  :param jobId: **[REQUIRED]** 

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

    

  
  :type thingName: string
  :param thingName: **[REQUIRED]** 

    The thing name associated with the device the job execution is running on.

    

  
  :type includeJobDocument: boolean
  :param includeJobDocument: 

    Optional. Unless set to false, the response contains the job document. The default is true.

    

  
  :type executionNumber: integer
  :param executionNumber: 

    Optional. A number that identifies a particular job execution on a particular device. If not specified, the latest job execution is returned.

    

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

    
    ::

      {
          'execution': {
              'jobId': 'string',
              'thingName': 'string',
              'status': 'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'REJECTED'|'REMOVED'|'CANCELED',
              'statusDetails': {
                  'string': 'string'
              },
              'queuedAt': 123,
              'startedAt': 123,
              'lastUpdatedAt': 123,
              'approximateSecondsBeforeTimedOut': 123,
              'versionNumber': 123,
              'executionNumber': 123,
              'jobDocument': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **execution** *(dict) --* 

        Contains data about a job execution.

        
        

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

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

          
        

        - **thingName** *(string) --* 

          The name of the thing that is executing the job.

          
        

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

          The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", "FAILED", "SUCCESS", "CANCELED", "TIMED_OUT", "REJECTED", or "REMOVED".

          
        

        - **statusDetails** *(dict) --* 

          A collection of name/value pairs that describe the status of the job execution.

           

          The maximum length of the value in the name/value pair is 1,024 characters.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **queuedAt** *(integer) --* 

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

          
        

        - **startedAt** *(integer) --* 

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

          
        

        - **lastUpdatedAt** *(integer) --* 

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

          
        

        - **approximateSecondsBeforeTimedOut** *(integer) --* 

          The estimated number of seconds that remain before the job execution status will be changed to ``TIMED_OUT``. The actual job execution timeout can occur up to 60 seconds later than the estimated duration.

          
        

        - **versionNumber** *(integer) --* 

          The version of the job execution. Job execution versions are incremented each time they are updated by a device.

          
        

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

          A number that identifies a particular job execution on a particular device. It can be used later in commands that return or update job execution information.

          
        

        - **jobDocument** *(string) --* 

          The content of the job document.

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

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

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

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

  
  *   :py:class:`IoTJobsDataPlane.Client.exceptions.CertificateValidationException`

  
  *   :py:class:`IoTJobsDataPlane.Client.exceptions.TerminalStateException`

  