list_databases

list_databases(**kwargs)

Lists the databases in the specified data catalog.

See also: AWS API Documentation

Request Syntax

response = client.list_databases(
    CatalogName='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • CatalogName (string) --

    [REQUIRED]

    The name of the data catalog that contains the databases to return.

  • 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.
  • MaxResults (integer) -- Specifies the maximum number of results to return.
Return type

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

  • Athena.Client.exceptions.InternalServerException
  • Athena.Client.exceptions.InvalidRequestException
  • Athena.Client.exceptions.MetadataException