Skip to content

GlueClient.get_databases

rboto-glue==0.4.0 · Service index · Types

Model summary (excerpt): Retrieves all databases defined in a given Data Catalog.

Install and imports

python -m pip install "rboto[glue]==0.4.0"
from rboto import GlueClient
from collections.abc import Sequence
from rboto_glue.types import (
    DatabaseAttributes,
    GetDatabasesOutput,
    ResourceShareType,
)

Signature

async def get_databases(
    *,
    catalog_id: str | None = None,
    next_token: str | None = None,
    max_results: int | None = None,
    resource_share_type: ResourceShareType | None = None,
    attributes_to_get: Sequence[DatabaseAttributes] | None = None,
) -> GetDatabasesOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
catalog_id No The ID of the Data Catalog from which to retrieve Databases . If none is provided, the Amazon Web Services account ID is used by default.
next_token No A continuation token, if this is a continuation call.
max_results No The maximum number of databases to return in one response.
resource_share_type No Allows you to specify that you want to list the databases shared with your account. The allowable values are FEDERATED , FOREIGN or ALL . If set to FEDERATED , will list the federated databases (referencing an external entity) shared with your account. If set to FOREIGN , will list the databases shared with your account. If set to ALL , will list the databases shared with your account, as well...
attributes_to_get No Specifies the database fields returned by the GetDatabases call. This parameter doesn’t accept an empty list. The request must include the NAME .

Output

GetDatabasesOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
database_list list[DatabaseOutput] Always present DatabaseOutput
next_token str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

DatabaseAttributes, GetDatabasesOutput, ResourceShareType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.get_databases(...) accepts the same arguments and returns AsyncIterator[GetDatabasesOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: next_token. Page-size argument: max_results.

No output stream.

Errors

Import from rboto_glue.exceptions:

EntityNotFoundError, FederationSourceError, FederationSourceRetryableError, GlueEncryptionError, InternalServiceError, InvalidInputError, OperationTimeoutError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Example

Complete, type-checked service example. Replace its placeholders and configure credentials before running it.

import asyncio
import os

from rboto import GlueClient


async def main() -> None:
    async with GlueClient(region=os.environ.get("AWS_REGION", "us-east-1")) as client:
        async for page in client.paginators.get_databases(max_results=10):
            for database in page.database_list or []:
                print(database.name, database.description)


if __name__ == "__main__":
    asyncio.run(main())

Service guide · Pinned model