Skip to main content

snapshots

Creates, updates, deletes, gets or lists a snapshots resource.

Overview

Namesnapshots
TypeResource
Idaws.memorydb.snapshots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN (Amazon Resource Name) of the snapshot.
cluster_configurationobjectThe configuration of the cluster from which the snapshot was taken
data_tieringstringEnables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must be set when using r6gd nodes. For more information, see Data tiering. (true, false)
kms_key_idstringThe ID of the KMS key used to encrypt the snapshot.
namestringThe name of the snapshot
sourcestringIndicates whether the snapshot is from an automatic backup (automated) or was created manually (manual).
statusstringThe status of the snapshot. Valid values: creating | available | restoring | copying | deleting.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_snapshotsselectregionReturns information about cluster snapshots. By default, DescribeSnapshots lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with a particular cluster.
create_snapshotinsertregion, ClusterName, SnapshotNameCreates a copy of an entire cluster at a specific moment in time.
delete_snapshotdeleteregionDeletes an existing snapshot. When you receive a successful response from this operation, MemoryDB immediately begins deleting the snapshot; you cannot cancel or revert this operation.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about cluster snapshots. By default, DescribeSnapshots lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with a particular cluster.

SELECT
arn,
cluster_configuration,
data_tiering,
kms_key_id,
name,
source,
status
FROM aws.memorydb.snapshots
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a copy of an entire cluster at a specific moment in time.

INSERT INTO aws.memorydb.snapshots (
ClusterName,
SnapshotName,
KmsKeyId,
Tags,
region
)
SELECT
'{{ ClusterName }}' /* required */,
'{{ SnapshotName }}' /* required */,
'{{ KmsKeyId }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
snapshot
;

DELETE examples

Deletes an existing snapshot. When you receive a successful response from this operation, MemoryDB immediately begins deleting the snapshot; you cannot cancel or revert this operation.

DELETE FROM aws.memorydb.snapshots
WHERE region = '{{ region }}' --required
;