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

************************
list_prepared_statements
************************



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

  

  Lists the prepared statements in the specified workgroup.

  

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


  **Request Syntax**
  ::

    response = client.list_prepared_statements(
        WorkGroup='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type WorkGroup: string
  :param WorkGroup: **[REQUIRED]** 

    The workgroup to list the prepared statements for.

    

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

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return in this request.

    

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

    
    ::

      {
          'PreparedStatements': [
              {
                  'StatementName': 'string',
                  'LastModifiedTime': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PreparedStatements** *(list) --* 

        The list of prepared statements for the workgroup.

        
        

        - *(dict) --* 

          The name and last modified time of the prepared statement.

          
          

          - **StatementName** *(string) --* 

            The name of the prepared statement.

            
          

          - **LastModifiedTime** *(datetime) --* 

            The last modified time of the prepared statement.

            
      
    
      

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

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

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

  