snapshots
Creates, updates, deletes, gets or lists a snapshots resource.
Overview
| Name | snapshots |
| Type | Resource |
| Id | aws.memorydb.snapshots |
Fields
The following fields are returned by SELECT queries:
- describe_snapshots
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN (Amazon Resource Name) of the snapshot. |
cluster_configuration | object | The configuration of the cluster from which the snapshot was taken |
data_tiering | string | Enables 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_id | string | The ID of the KMS key used to encrypt the snapshot. |
name | string | The name of the snapshot |
source | string | Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). |
status | string | The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_snapshots | select | region | 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. | |
create_snapshot | insert | region, ClusterName, SnapshotName | Creates a copy of an entire cluster at a specific moment in time. | |
delete_snapshot | delete | region | 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. |
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
- describe_snapshots
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
- create_snapshot
- Manifest
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
;
# Description fields are for documentation purposes
- name: snapshots
props:
- name: region
value: "{{ region }}"
description: Required parameter for the snapshots resource.
- name: ClusterName
value: "{{ ClusterName }}"
description: |
The snapshot is created from this cluster.
- name: SnapshotName
value: "{{ SnapshotName }}"
description: |
A name for the snapshot being created.
- name: KmsKeyId
value: "{{ KmsKeyId }}"
description: |
The ID of the KMS key used to encrypt the snapshot.
- name: Tags
description: |
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_snapshot
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
;