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

**************
list_databases
**************



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

  

  Lists the databases in the specified data catalog.

  

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


  **Request Syntax**
  ::

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

    The name of the data catalog that contains the databases 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.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    Specifies the maximum number of results to return.

    

  
  :type WorkGroup: string
  :param WorkGroup: 

    The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.

    

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

    
    ::

      {
          'DatabaseList': [
              {
                  'Name': 'string',
                  'Description': 'string',
                  'Parameters': {
                      'string': 'string'
                  }
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DatabaseList** *(list) --* 

        A list of databases from a data catalog.

        
        

        - *(dict) --* 

          Contains metadata information for a database in a data catalog.

          
          

          - **Name** *(string) --* 

            The name of the database.

            
          

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

            An optional description of the database.

            
          

          - **Parameters** *(dict) --* 

            A set of custom key/value pairs.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

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

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

  