relational_database_snapshots
Creates, updates, deletes, gets or lists a relational_database_snapshots resource.
Overview
| Name | relational_database_snapshots |
| Type | Resource |
| Id | aws.lightsail.relational_database_snapshots |
Fields
The following fields are returned by SELECT queries:
- get_relational_database_snapshot
- get_relational_database_snapshots
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the database snapshot. (pattern: <code>\w[\w-]*\w</code>) |
arn | string | The Amazon Resource Name (ARN) of the database snapshot. (pattern: <code>.\S.</code>) |
created_at | string (date-time) | The timestamp when the database snapshot was created. |
engine | string | The software of the database snapshot (for example, MySQL) (pattern: <code>.\S.</code>) |
engine_version | string | The database engine version for the database snapshot (for example, 5.7.23). (pattern: <code>.\S.</code>) |
from_relational_database_arn | string | The Amazon Resource Name (ARN) of the database from which the database snapshot was created. (pattern: <code>.\S.</code>) |
from_relational_database_blueprint_id | string | The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database. |
from_relational_database_bundle_id | string | The bundle ID of the database from which the database snapshot was created. |
from_relational_database_name | string | The name of the source database from which the database snapshot was created. (pattern: <code>.\S.</code>) |
location | object | The Region name and Availability Zone where the database snapshot is located. |
resource_type | string | The Lightsail resource type. (ContainerService, Instance, StaticIp, KeyPair, InstanceSnapshot, Domain, PeeredVpc, LoadBalancer, LoadBalancerTlsCertificate, Disk, DiskSnapshot, RelationalDatabase, RelationalDatabaseSnapshot, ExportSnapshotRecord, CloudFormationStackRecord, Alarm, ContactMethod, Distribution, Certificate, Bucket) |
size_in_gb | integer | The size of the disk in GB (for example, 32) for the database snapshot. |
state | string | The state of the database snapshot. (pattern: <code>.\S.</code>) |
support_code | string | The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily. |
tags | array | The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the database snapshot. (pattern: <code>\w[\w-]*\w</code>) |
arn | string | The Amazon Resource Name (ARN) of the database snapshot. (pattern: <code>.\S.</code>) |
created_at | string (date-time) | The timestamp when the database snapshot was created. |
engine | string | The software of the database snapshot (for example, MySQL) (pattern: <code>.\S.</code>) |
engine_version | string | The database engine version for the database snapshot (for example, 5.7.23). (pattern: <code>.\S.</code>) |
from_relational_database_arn | string | The Amazon Resource Name (ARN) of the database from which the database snapshot was created. (pattern: <code>.\S.</code>) |
from_relational_database_blueprint_id | string | The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database. |
from_relational_database_bundle_id | string | The bundle ID of the database from which the database snapshot was created. |
from_relational_database_name | string | The name of the source database from which the database snapshot was created. (pattern: <code>.\S.</code>) |
location | object | The Region name and Availability Zone where the database snapshot is located. |
resource_type | string | The Lightsail resource type. (ContainerService, Instance, StaticIp, KeyPair, InstanceSnapshot, Domain, PeeredVpc, LoadBalancer, LoadBalancerTlsCertificate, Disk, DiskSnapshot, RelationalDatabase, RelationalDatabaseSnapshot, ExportSnapshotRecord, CloudFormationStackRecord, Alarm, ContactMethod, Distribution, Certificate, Bucket) |
size_in_gb | integer | The size of the disk in GB (for example, 32) for the database snapshot. |
state | string | The state of the database snapshot. (pattern: <code>.\S.</code>) |
support_code | string | The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily. |
tags | array | The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_relational_database_snapshot | select | region | Returns information about a specific database snapshot in Amazon Lightsail. | |
get_relational_database_snapshots | select | region | Returns information about all of your database snapshots in Amazon Lightsail. | |
create_relational_database_snapshot | insert | region, relationalDatabaseName, relationalDatabaseSnapshotName | Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a database, and to save data before deleting a database. The create relational database snapshot operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide. | |
delete_relational_database_snapshot | delete | region | Deletes a database snapshot in Amazon Lightsail. The delete relational database snapshot operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_relational_database_snapshot
- get_relational_database_snapshots
Returns information about a specific database snapshot in Amazon Lightsail.
SELECT
name,
arn,
created_at,
engine,
engine_version,
from_relational_database_arn,
from_relational_database_blueprint_id,
from_relational_database_bundle_id,
from_relational_database_name,
location,
resource_type,
size_in_gb,
state,
support_code,
tags
FROM aws.lightsail.relational_database_snapshots
WHERE region = '{{ region }}' -- required
;
Returns information about all of your database snapshots in Amazon Lightsail.
SELECT
name,
arn,
created_at,
engine,
engine_version,
from_relational_database_arn,
from_relational_database_blueprint_id,
from_relational_database_bundle_id,
from_relational_database_name,
location,
resource_type,
size_in_gb,
state,
support_code,
tags
FROM aws.lightsail.relational_database_snapshots
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_relational_database_snapshot
- Manifest
Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a database, and to save data before deleting a database. The create relational database snapshot operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide.
INSERT INTO aws.lightsail.relational_database_snapshots (
relationalDatabaseName,
relationalDatabaseSnapshotName,
tags,
region
)
SELECT
'{{ relationalDatabaseName }}' /* required */,
'{{ relationalDatabaseSnapshotName }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
operations
;
# Description fields are for documentation purposes
- name: relational_database_snapshots
props:
- name: region
value: "{{ region }}"
description: Required parameter for the relational_database_snapshots resource.
- name: relationalDatabaseName
value: "{{ relationalDatabaseName }}"
description: |
The name of the database on which to base your new snapshot.
- name: relationalDatabaseSnapshotName
value: "{{ relationalDatabaseSnapshotName }}"
description: |
The name for your new database snapshot. Constraints: Must contain from 2 to 255 alphanumeric characters, or hyphens. The first and last character must be a letter or number.
- name: tags
description: |
The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created.
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_relational_database_snapshot
Deletes a database snapshot in Amazon Lightsail. The delete relational database snapshot operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Amazon Lightsail Developer Guide.
DELETE FROM aws.lightsail.relational_database_snapshots
WHERE region = '{{ region }}' --required
;