Skip to content

aws.lightsail.get_relational_databases

Example SQL Queries

SELECT * FROM
aws.lightsail.get_relational_databases;

Description

Returns information about all of your databases in Amazon Lightsail.

Table Definition

Column NameColumn Data Type
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
arn

The Amazon Resource Name (ARN) of the database.

VARCHAR
backup_retention_enabled

A Boolean value indicating whether automated backup retention is enabled for the database.

BOOLEAN
ca_certificate_identifier

The certificate associated with the database.

VARCHAR
created_at

The timestamp when the database was created. Formatted in Unix time.

TIMESTAMP_S
engine

The database software (for example, MySQL).

VARCHAR
engine_version

The database engine version (for example, 5.7.23).

VARCHAR
hardware

Describes the hardware of the database.

STRUCT(
"cpu_count" BIGINT,
"disk_size_in_gb" BIGINT,
"ram_size_in_gb" DOUBLE
)
Show child fields
hardware.cpu_count

The number of vCPUs for the database.

hardware.disk_size_in_gb

The size of the disk for the database.

hardware.ram_size_in_gb

The amount of RAM in GB for the database.

latest_restorable_time

The latest point in time to which the database can be restored. Formatted in Unix time.

TIMESTAMP_S
location

The Region name and Availability Zone where the database is located.

STRUCT(
"availability_zone" VARCHAR,
"region_name" VARCHAR
)
Show child fields
location.availability_zone

The Availability Zone. Follows the format us-east-2a (case-sensitive).

location.region_name

The Amazon Web Services Region name.

master_database_name

The name of the master database created when the Lightsail database resource is created.

VARCHAR
master_endpoint

The master endpoint for the database.

STRUCT(
"port" BIGINT,
"address" VARCHAR
)
Show child fields
master_endpoint.address

Specifies the DNS address of the database.

master_endpoint.port

Specifies the port that the database is listening on.

master_username

The master user name of the database.

VARCHAR
name

The unique name of the database resource in Lightsail.

VARCHAR
parameter_apply_status

The status of parameter updates for the database.

VARCHAR
pending_maintenance_actions

Describes the pending maintenance actions for the database.

STRUCT(
"action" VARCHAR,
"description" VARCHAR,
"current_apply_date" TIMESTAMP_S
)[]
Show child fields
pending_maintenance_actions[]
Show child fields
pending_maintenance_actions[].action

The type of pending database maintenance action.

pending_maintenance_actions[].current_apply_date

The effective date of the pending database maintenance action.

pending_maintenance_actions[].description

Additional detail about the pending database maintenance action.

pending_modified_values

Describes pending database value modifications.

STRUCT(
"master_user_password" VARCHAR,
"engine_version" VARCHAR,
"backup_retention_enabled" BOOLEAN
)
Show child fields
pending_modified_values.backup_retention_enabled

A Boolean value indicating whether automated backup retention is enabled.

pending_modified_values.engine_version

The database engine version.

pending_modified_values.master_user_password

The password for the master user of the database.

preferred_backup_window

The daily time range during which automated backups are created for the database (for example, 16:00-16:30).

VARCHAR
preferred_maintenance_window

The weekly time range during which system maintenance can occur on the database.

In the format ddd:hh24:mi-ddd:hh24:mi. For example, Tue:17:00-Tue:17:30.

VARCHAR
publicly_accessible

A Boolean value indicating whether the database is publicly accessible.

BOOLEAN
relational_database_blueprint_id

The blueprint ID for the database. A blueprint describes the major engine version of a database.

VARCHAR
relational_database_bundle_id

The bundle ID for the database. A bundle describes the performance specifications for your database.

VARCHAR
resource_type

The Lightsail resource type for the database (for example, RelationalDatabase).

VARCHAR
secondary_availability_zone

Describes the secondary Availability Zone of a high availability database.

The secondary database is used for failover support of a high availability database.

VARCHAR
state

Describes the current state of the database.

VARCHAR
support_code

The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.

VARCHAR
tags

The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
Show child fields
tags[]
Show child fields
tags[].key

The key of the tag.

Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

tags[].value

The value of the tag.

Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@