:doc:`EMRServerless <../../emr-serverless>` / Client / list_job_runs

*************
list_job_runs
*************



.. py:method:: EMRServerless.Client.list_job_runs(**kwargs)

  

  Lists job runs based on a set of parameters.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/emr-serverless-2021-07-13/ListJobRuns>`_  


  **Request Syntax**
  ::

    response = client.list_job_runs(
        applicationId='string',
        nextToken='string',
        maxResults=123,
        createdAtAfter=datetime(2015, 1, 1),
        createdAtBefore=datetime(2015, 1, 1),
        states=[
            'SUBMITTED'|'PENDING'|'SCHEDULED'|'RUNNING'|'SUCCESS'|'FAILED'|'CANCELLING'|'CANCELLED'|'QUEUED',
        ],
        mode='BATCH'|'STREAMING'
    )
    
  :type applicationId: string
  :param applicationId: **[REQUIRED]** 

    The ID of the application for which to list the job run.

    

  
  :type nextToken: string
  :param nextToken: 

    The token for the next set of job run results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of job runs that can be listed.

    

  
  :type createdAtAfter: datetime
  :param createdAtAfter: 

    The lower bound of the option to filter by creation date and time.

    

  
  :type createdAtBefore: datetime
  :param createdAtBefore: 

    The upper bound of the option to filter by creation date and time.

    

  
  :type states: list
  :param states: 

    An optional filter for job run states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.

    

  
    - *(string) --* 

    

  :type mode: string
  :param mode: 

    The mode of the job runs to list.

    

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

    
    ::

      {
          'jobRuns': [
              {
                  'applicationId': 'string',
                  'id': 'string',
                  'name': 'string',
                  'mode': 'BATCH'|'STREAMING',
                  'arn': 'string',
                  'createdBy': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'updatedAt': datetime(2015, 1, 1),
                  'executionRole': 'string',
                  'state': 'SUBMITTED'|'PENDING'|'SCHEDULED'|'RUNNING'|'SUCCESS'|'FAILED'|'CANCELLING'|'CANCELLED'|'QUEUED',
                  'stateDetails': 'string',
                  'releaseLabel': 'string',
                  'type': 'string',
                  'attempt': 123,
                  'attemptCreatedAt': datetime(2015, 1, 1),
                  'attemptUpdatedAt': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **jobRuns** *(list) --* 

        The output lists information about the specified job runs.

        
        

        - *(dict) --* 

          The summary of attributes associated with a job run.

          
          

          - **applicationId** *(string) --* 

            The ID of the application the job is running on.

            
          

          - **id** *(string) --* 

            The ID of the job run.

            
          

          - **name** *(string) --* 

            The optional job run name. This doesn't have to be unique.

            
          

          - **mode** *(string) --* 

            The mode of the job run.

            
          

          - **arn** *(string) --* 

            The ARN of the job run.

            
          

          - **createdBy** *(string) --* 

            The user who created the job run.

            
          

          - **createdAt** *(datetime) --* 

            The date and time when the job run was created.

            
          

          - **updatedAt** *(datetime) --* 

            The date and time when the job run was last updated.

            
          

          - **executionRole** *(string) --* 

            The execution role ARN of the job run.

            
          

          - **state** *(string) --* 

            The state of the job run.

            
          

          - **stateDetails** *(string) --* 

            The state details of the job run.

            
          

          - **releaseLabel** *(string) --* 

            The Amazon EMR release associated with the application your job is running on.

            
          

          - **type** *(string) --* 

            The type of job run, such as Spark or Hive.

            
          

          - **attempt** *(integer) --* 

            The attempt number of the job run execution.

            
          

          - **attemptCreatedAt** *(datetime) --* 

            The date and time of when the job run attempt was created.

            
          

          - **attemptUpdatedAt** *(datetime) --* 

            The date and time of when the job run attempt was last updated.

            
      
    
      

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

        The output displays the token for the next set of job run results. This is required for pagination and is available as a response of the previous request.

        
  
  **Exceptions**
  
  *   :py:class:`EMRServerless.Client.exceptions.ValidationException`

  
  *   :py:class:`EMRServerless.Client.exceptions.InternalServerException`

  