Skip to main content

cluster_snapshots

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

Overview

Namecluster_snapshots
TypeResource
Idaws.docdb_elastic.cluster_snapshots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
admin_user_namestringThe name of the elastic cluster administrator.
cluster_arnstringThe ARN identifier of the elastic cluster.
cluster_creation_timestringThe time when the elastic cluster was created in Universal Coordinated Time (UTC).
kms_key_idstringThe KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.
snapshot_arnstringThe ARN identifier of the elastic cluster snapshot.
snapshot_creation_timestringThe time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
snapshot_namestringThe name of the elastic cluster snapshot.
snapshot_typestringThe type of cluster snapshots to be returned. You can specify one of the following values: automated - Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account. manual - Return all cluster snapshots that you have manually created for your Amazon Web Services account. (MANUAL, AUTOMATED)
statusstringThe status of the elastic cluster snapshot. (CREATING, ACTIVE, DELETING, UPDATING, VPC_ENDPOINT_LIMIT_EXCEEDED, IP_ADDRESS_LIMIT_EXCEEDED, INVALID_SECURITY_GROUP_ID, INVALID_SUBNET_ID, INACCESSIBLE_ENCRYPTION_CREDS, INACCESSIBLE_SECRET_ARN, INACCESSIBLE_VPC_ENDPOINT, INCOMPATIBLE_NETWORK, MERGING, MODIFYING, SPLITTING, COPYING, STARTING, STOPPING, STOPPED, MAINTENANCE, INACCESSIBLE_ENCRYPTION_CREDENTIALS_RECOVERABLE)
subnet_idsarrayThe Amazon EC2 subnet IDs for the elastic cluster.
vpc_security_group_idsarrayA list of EC2 VPC security groups to associate with the elastic cluster.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cluster_snapshotselectsnapshot_arn, regionReturns information about a specific elastic cluster snapshot
list_cluster_snapshotsselectregionclusterArn, maxResults, nextToken, snapshotTypeReturns information about snapshots for a specified elastic cluster.
create_cluster_snapshotinsertregion, clusterArn, snapshotNameCreates a snapshot of an elastic cluster.
delete_cluster_snapshotdeletesnapshot_arn, regionDelete an elastic cluster snapshot.

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)
snapshot_arnstringThe ARN identifier of the elastic cluster snapshot that is to be deleted.
clusterArnstringThe ARN identifier of the elastic cluster.
maxResultsintegerThe maximum number of elastic cluster snapshot results to receive in the response.
nextTokenstringA pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by max-results. If there is no more data in the responce, the nextToken will not be returned.
snapshotTypestringThe type of cluster snapshots to be returned. You can specify one of the following values: automated - Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account. manual - Return all cluster snapshots that you have manually created for your Amazon Web Services account.

SELECT examples

Returns information about a specific elastic cluster snapshot

SELECT
admin_user_name,
cluster_arn,
cluster_creation_time,
kms_key_id,
snapshot_arn,
snapshot_creation_time,
snapshot_name,
snapshot_type,
status,
subnet_ids,
vpc_security_group_ids
FROM aws.docdb_elastic.cluster_snapshots
WHERE snapshot_arn = '{{ snapshot_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a snapshot of an elastic cluster.

INSERT INTO aws.docdb_elastic.cluster_snapshots (
clusterArn,
snapshotName,
tags,
region
)
SELECT
'{{ clusterArn }}' /* required */,
'{{ snapshotName }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
snapshot
;

DELETE examples

Delete an elastic cluster snapshot.

DELETE FROM aws.docdb_elastic.cluster_snapshots
WHERE snapshot_arn = '{{ snapshot_arn }}' --required
AND region = '{{ region }}' --required
;