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

**********************
get_prepared_statement
**********************



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

  

  Retrieves the prepared statement with the specified name from the specified workgroup.

  

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


  **Request Syntax**
  ::

    response = client.get_prepared_statement(
        StatementName='string',
        WorkGroup='string'
    )
    
  :type StatementName: string
  :param StatementName: **[REQUIRED]** 

    The name of the prepared statement to retrieve.

    

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

    The workgroup to which the statement to be retrieved belongs.

    

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

    
    ::

      {
          'PreparedStatement': {
              'StatementName': 'string',
              'QueryStatement': 'string',
              'WorkGroupName': 'string',
              'Description': 'string',
              'LastModifiedTime': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PreparedStatement** *(dict) --* 

        The name of the prepared statement that was retrieved.

        
        

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

          The name of the prepared statement.

          
        

        - **QueryStatement** *(string) --* 

          The query string for the prepared statement.

          
        

        - **WorkGroupName** *(string) --* 

          The name of the workgroup to which the prepared statement belongs.

          
        

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

          The description of the prepared statement.

          
        

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

          The last modified time of the prepared statement.

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

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

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

  