:doc:`Athena <../../athena>` / Client / list_executors

**************
list_executors
**************



.. py:method:: Athena.Client.list_executors(**kwargs)

  

  Lists, in descending order, the executors that joined a session. Newer executors are listed first; older executors are listed later. The result can be optionally filtered by state.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListExecutors>`_  


  **Request Syntax**
  ::

    response = client.list_executors(
        SessionId='string',
        ExecutorStateFilter='CREATING'|'CREATED'|'REGISTERED'|'TERMINATING'|'TERMINATED'|'FAILED',
        MaxResults=123,
        NextToken='string'
    )
    
  :type SessionId: string
  :param SessionId: **[REQUIRED]** 

    The session ID.

    

  
  :type ExecutorStateFilter: string
  :param ExecutorStateFilter: 

    A filter for a specific executor state. A description of each state follows.

     

    ``CREATING`` - The executor is being started, including acquiring resources.

     

    ``CREATED`` - The executor has been started.

     

    ``REGISTERED`` - The executor has been registered.

     

    ``TERMINATING`` - The executor is in the process of shutting down.

     

    ``TERMINATED`` - The executor is no longer running.

     

    ``FAILED`` - Due to a failure, the executor is no longer running.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of executors to return.

    

  
  :type NextToken: string
  :param NextToken: 

    A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the ``NextToken`` from the response object of the previous page call.

    

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

    
    ::

      {
          'SessionId': 'string',
          'NextToken': 'string',
          'ExecutorsSummary': [
              {
                  'ExecutorId': 'string',
                  'ExecutorType': 'COORDINATOR'|'GATEWAY'|'WORKER',
                  'StartDateTime': 123,
                  'TerminationDateTime': 123,
                  'ExecutorState': 'CREATING'|'CREATED'|'REGISTERED'|'TERMINATING'|'TERMINATED'|'FAILED',
                  'ExecutorSize': 123
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SessionId** *(string) --* 

        The session ID.

        
      

      - **NextToken** *(string) --* 

        A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the ``NextToken`` from the response object of the previous page call.

        
      

      - **ExecutorsSummary** *(list) --* 

        Contains summary information about the executor.

        
        

        - *(dict) --* 

          Contains summary information about an executor.

          
          

          - **ExecutorId** *(string) --* 

            The UUID of the executor.

            
          

          - **ExecutorType** *(string) --* 

            The type of executor used for the application ( ``COORDINATOR``, ``GATEWAY``, or ``WORKER``).

            
          

          - **StartDateTime** *(integer) --* 

            The date and time that the executor started.

            
          

          - **TerminationDateTime** *(integer) --* 

            The date and time that the executor was terminated.

            
          

          - **ExecutorState** *(string) --* 

            The processing state of the executor. A description of each state follows.

             

            ``CREATING`` - The executor is being started, including acquiring resources.

             

            ``CREATED`` - The executor has been started.

             

            ``REGISTERED`` - The executor has been registered.

             

            ``TERMINATING`` - The executor is in the process of shutting down.

             

            ``TERMINATED`` - The executor is no longer running.

             

            ``FAILED`` - Due to a failure, the executor is no longer running.

            
          

          - **ExecutorSize** *(integer) --* 

            The smallest unit of compute that a session can request from Athena. Size is measured in data processing unit (DPU) values, a relative measure of processing power.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Athena.Client.exceptions.InternalServerException`

  
  *   :py:class:`Athena.Client.exceptions.InvalidRequestException`

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

  