Skip to main content

database

Gets an individual database resource

Overview

Namedatabase
TypeResource
Descriptiondatabase
Idawscc.lightsail.database

Fields

NameDatatypeDescription
relational_database_namestringThe name to use for your new Lightsail database resource.
database_arnstring
availability_zonestringThe Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
relational_database_blueprint_idstringThe blueprint ID for your new database. A blueprint describes the major engine version of a database.
relational_database_bundle_idstringThe bundle ID for your new database. A bundle describes the performance specifications for your database.
master_database_namestringThe name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
master_usernamestringThe name for the master user.
master_user_passwordstringThe password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
preferred_backup_windowstringThe daily time range during which automated backups are created for your new database if automated backups are enabled.
preferred_maintenance_windowstringThe weekly time range during which system maintenance can occur on your new database.
publicly_accessiblebooleanSpecifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
ca_certificate_identifierstringIndicates the certificate that needs to be associated with the database.
backup_retentionbooleanWhen true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
rotate_master_user_passwordbooleanWhen true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
relational_database_parametersarrayUpdate one or more parameters of the relational database.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
relational_database_name,
database_arn,
availability_zone,
relational_database_blueprint_id,
relational_database_bundle_id,
master_database_name,
master_username,
master_user_password,
preferred_backup_window,
preferred_maintenance_window,
publicly_accessible,
ca_certificate_identifier,
backup_retention,
rotate_master_user_password,
relational_database_parameters,
tags
FROM awscc.lightsail.database
WHERE data__Identifier = '<RelationalDatabaseName>';

Permissions

To operate on the database resource, the following permissions are required:

Read

lightsail:GetRelationalDatabase,
lightsail:GetRelationalDatabases

Update

lightsail:GetRelationalDatabase,
lightsail:GetRelationalDatabases,
lightsail:TagResource,
lightsail:UntagResource,
lightsail:UpdateRelationalDatabase,
lightsail:UpdateRelationalDatabaseParameters

Delete

lightsail:DeleteRelationalDatabase,
lightsail:GetRelationalDatabase,
lightsail:GetRelationalDatabases