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

***************************
list_calculation_executions
***************************



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

  

  Lists the calculations that have been submitted to a session in descending order. Newer calculations are listed first; older calculations are listed later.

  

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


  **Request Syntax**
  ::

    response = client.list_calculation_executions(
        SessionId='string',
        StateFilter='CREATING'|'CREATED'|'QUEUED'|'RUNNING'|'CANCELING'|'CANCELED'|'COMPLETED'|'FAILED',
        MaxResults=123,
        NextToken='string'
    )
    
  :type SessionId: string
  :param SessionId: **[REQUIRED]** 

    The session ID.

    

  
  :type StateFilter: string
  :param StateFilter: 

    A filter for a specific calculation execution state. A description of each state follows.

     

    ``CREATING`` - The calculation is in the process of being created.

     

    ``CREATED`` - The calculation has been created and is ready to run.

     

    ``QUEUED`` - The calculation has been queued for processing.

     

    ``RUNNING`` - The calculation is running.

     

    ``CANCELING`` - A request to cancel the calculation has been received and the system is working to stop it.

     

    ``CANCELED`` - The calculation is no longer running as the result of a cancel request.

     

    ``COMPLETED`` - The calculation has completed without error.

     

    ``FAILED`` - The calculation failed and is no longer running.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of calculation executions 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**

    
    ::

      {
          'NextToken': 'string',
          'Calculations': [
              {
                  'CalculationExecutionId': 'string',
                  'Description': 'string',
                  'Status': {
                      'SubmissionDateTime': datetime(2015, 1, 1),
                      'CompletionDateTime': datetime(2015, 1, 1),
                      'State': 'CREATING'|'CREATED'|'QUEUED'|'RUNNING'|'CANCELING'|'CANCELED'|'COMPLETED'|'FAILED',
                      'StateChangeReason': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        
      

      - **Calculations** *(list) --* 

        A list of  CalculationSummary objects.

        
        

        - *(dict) --* 

          Summary information for a notebook calculation.

          
          

          - **CalculationExecutionId** *(string) --* 

            The calculation execution UUID.

            
          

          - **Description** *(string) --* 

            A description of the calculation.

            
          

          - **Status** *(dict) --* 

            Contains information about the status of the calculation.

            
            

            - **SubmissionDateTime** *(datetime) --* 

              The date and time the calculation was submitted for processing.

              
            

            - **CompletionDateTime** *(datetime) --* 

              The date and time the calculation completed processing.

              
            

            - **State** *(string) --* 

              The state of the calculation execution. A description of each state follows.

               

              ``CREATING`` - The calculation is in the process of being created.

               

              ``CREATED`` - The calculation has been created and is ready to run.

               

              ``QUEUED`` - The calculation has been queued for processing.

               

              ``RUNNING`` - The calculation is running.

               

              ``CANCELING`` - A request to cancel the calculation has been received and the system is working to stop it.

               

              ``CANCELED`` - The calculation is no longer running as the result of a cancel request.

               

              ``COMPLETED`` - The calculation has completed without error.

               

              ``FAILED`` - The calculation failed and is no longer running.

              
            

            - **StateChangeReason** *(string) --* 

              The reason for the calculation state change (for example, the calculation was canceled because the session was terminated).

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

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

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

  