Find all databases (Python)
Lists all databases.
|
You need an application token with permission to create and configure databases, such as the Organization Administrator role. For more information, see Get endpoint and token. |
Result
Returns a list of AstraDBAdminDatabaseInfo objects that each describe a database.
Parameters
Use the list_databases method, which belongs to the AstraDBAdmin class.
Method signature
list_databases(
*,
include: str,
provider: str,
page_size: int,
database_admin_timeout_ms: int,
request_timeout_ms: int,
timeout_ms: int,
) -> list[AstraDBAdminDatabaseInfo]
| Name | Type | Summary |
|---|---|---|
|
|
Optional. Filters the returned databases by status. Can be one of: Some of these status are short-lived or do not apply to Astra DB Serverless databases. Default: |
|
|
Optional. Filters the returned databases by cloud provider. Can be one of: Default: |
|
|
Optional. The number of results per page for the underlying API request. The client manages pagination for you and returns the full list. Maximum: 100 Default: 25 |
|
|
Optional.
A timeout, in milliseconds, to impose on each underlying API request.
If not provided, the This parameter is aliased as |
Examples
The following examples demonstrate how to list databases.
from astrapy import DataAPIClient
client = DataAPIClient("APPLICATION_TOKEN")
admin = client.get_admin()
databases = admin.list_databases()
print(databases)
Client reference
For more information, see the client reference.