cluster_snapshots
Creates, updates, deletes, gets or lists a cluster_snapshots resource.
Overview
| Name | cluster_snapshots |
| Type | Resource |
| Id | aws.docdb_elastic.cluster_snapshots |
Fields
The following fields are returned by SELECT queries:
- get_cluster_snapshot
- list_cluster_snapshots
| Name | Datatype | Description |
|---|---|---|
admin_user_name | string | The name of the elastic cluster administrator. |
cluster_arn | string | The ARN identifier of the elastic cluster. |
cluster_creation_time | string | The time when the elastic cluster was created in Universal Coordinated Time (UTC). |
kms_key_id | string | The 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_arn | string | The ARN identifier of the elastic cluster snapshot. |
snapshot_creation_time | string | The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC). |
snapshot_name | string | The name of the elastic cluster snapshot. |
snapshot_type | string | The 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) |
status | string | The 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_ids | array | The Amazon EC2 subnet IDs for the elastic cluster. |
vpc_security_group_ids | array | A list of EC2 VPC security groups to associate with the elastic cluster. |
| Name | Datatype | Description |
|---|---|---|
cluster_arn | string | The ARN identifier of the elastic cluster. |
snapshot_arn | string | The ARN identifier of the elastic cluster snapshot. |
snapshot_creation_time | string | The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC). |
snapshot_name | string | The name of the elastic cluster snapshot. |
status | string | The 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) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cluster_snapshot | select | snapshot_arn, region | Returns information about a specific elastic cluster snapshot | |
list_cluster_snapshots | select | region | clusterArn, maxResults, nextToken, snapshotType | Returns information about snapshots for a specified elastic cluster. |
create_cluster_snapshot | insert | region, clusterArn, snapshotName | Creates a snapshot of an elastic cluster. | |
delete_cluster_snapshot | delete | snapshot_arn, region | Delete 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
snapshot_arn | string | The ARN identifier of the elastic cluster snapshot that is to be deleted. |
clusterArn | string | The ARN identifier of the elastic cluster. |
maxResults | integer | The maximum number of elastic cluster snapshot results to receive in the response. |
nextToken | string | A 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. |
snapshotType | string | The 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
- get_cluster_snapshot
- list_cluster_snapshots
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
;
Returns information about snapshots for a specified elastic cluster.
SELECT
cluster_arn,
snapshot_arn,
snapshot_creation_time,
snapshot_name,
status
FROM aws.docdb_elastic.cluster_snapshots
WHERE region = '{{ region }}' -- required
AND clusterArn = '{{ clusterArn }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND snapshotType = '{{ snapshotType }}'
;
INSERT examples
- create_cluster_snapshot
- Manifest
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
;
# Description fields are for documentation purposes
- name: cluster_snapshots
props:
- name: region
value: "{{ region }}"
description: Required parameter for the cluster_snapshots resource.
- name: clusterArn
value: "{{ clusterArn }}"
- name: snapshotName
value: "{{ snapshotName }}"
- name: tags
value: "{{ tags }}"
DELETE examples
- delete_cluster_snapshot
Delete an elastic cluster snapshot.
DELETE FROM aws.docdb_elastic.cluster_snapshots
WHERE snapshot_arn = '{{ snapshot_arn }}' --required
AND region = '{{ region }}' --required
;