List and filter on Linode Managed Databases.
- name: List all of the databases for the current Linode Account
linode.cloud.database_list: {}
- name: Resolve all MySQL databases for the current Linode Account
linode.cloud.database_list:
filters:
- name: engine
values: mysql
Field | Type | Required | Description |
---|---|---|---|
order |
str |
Optional | The order to list databases in. (Choices: desc , asc ; Default: asc ) |
order_by |
str |
Optional | The attribute to order databases by. |
filters (sub-options) |
list |
Optional | A list of filters to apply to the resulting databases. |
count |
int |
Optional | The number of results to return. If undefined, all results will be returned. |
Field | Type | Required | Description |
---|---|---|---|
name |
str |
Required | The name of the field to filter on. Valid filterable attributes can be found here: https://www.linode.com/docs/api/databases/#managed-databases-list-all__responses |
values |
list |
Required | A list of values to allow for this field. Fields will pass this filter if at least one of these values matches. |
-
databases
- The returned database.- Sample Response:
[ { "allow_list": [ "203.0.113.1/32", "192.0.1.0/24" ], "cluster_size": 3, "created": "2022-01-01T00:01:01", "encrypted": false, "engine": "mysql", "hosts": { "primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net", "secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net" }, "id": 123, "instance_uri": "/v4/databases/mysql/instances/123", "label": "example-db", "region": "us-east", "status": "active", "type": "g6-dedicated-2", "updated": "2022-01-01T00:01:01", "updates": { "day_of_week": 1, "duration": 3, "frequency": "weekly", "hour_of_day": 0, "week_of_month": null }, "version": "8.0.26" } ]
- See the Linode API response documentation for a list of returned fields
- Sample Response: