snapshot_copy_configurations
Creates, updates, deletes, gets or lists a snapshot_copy_configurations resource.
Overview
| Name | snapshot_copy_configurations |
| Type | Resource |
| Id | aws.redshift_serverless.snapshot_copy_configurations |
Fields
The following fields are returned by SELECT queries:
- list_snapshot_copy_configurations
| Name | Datatype | Description |
|---|---|---|
destination_kms_key_id | string | The ID of the KMS key to use to encrypt your snapshots in the destination Amazon Web Services Region. |
destination_region | string | The destination Amazon Web Services Region to copy snapshots to. |
namespace_name | string | The name of the namespace to copy snapshots from in the source Amazon Web Services Region. (pattern: <code>^[a-z0-9-]+$</code>) |
snapshot_copy_configuration_arn | string | The ARN of the snapshot copy configuration object. |
snapshot_copy_configuration_id | string | The ID of the snapshot copy configuration object. |
snapshot_retention_period | integer | The retention period of snapshots that are copied to the destination Amazon Web Services Region. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_snapshot_copy_configurations | select | region | Returns a list of snapshot copy configurations. | |
create_snapshot_copy_configuration | insert | region, destinationRegion, namespaceName | Creates a snapshot copy configuration that lets you copy snapshots to another Amazon Web Services Region. | |
update_snapshot_copy_configuration | update | region, snapshotCopyConfigurationId | Updates a snapshot copy configuration. | |
delete_snapshot_copy_configuration | delete | region | Deletes a snapshot copy configuration |
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
- list_snapshot_copy_configurations
Returns a list of snapshot copy configurations.
SELECT
destination_kms_key_id,
destination_region,
namespace_name,
snapshot_copy_configuration_arn,
snapshot_copy_configuration_id,
snapshot_retention_period
FROM aws.redshift_serverless.snapshot_copy_configurations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_snapshot_copy_configuration
- Manifest
Creates a snapshot copy configuration that lets you copy snapshots to another Amazon Web Services Region.
INSERT INTO aws.redshift_serverless.snapshot_copy_configurations (
destinationKmsKeyId,
destinationRegion,
namespaceName,
snapshotRetentionPeriod,
region
)
SELECT
'{{ destinationKmsKeyId }}',
'{{ destinationRegion }}' /* required */,
'{{ namespaceName }}' /* required */,
{{ snapshotRetentionPeriod }},
'{{ region }}'
RETURNING
snapshot_copy_configuration
;
# Description fields are for documentation purposes
- name: snapshot_copy_configurations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the snapshot_copy_configurations resource.
- name: destinationKmsKeyId
value: "{{ destinationKmsKeyId }}"
description: |
The KMS key to use to encrypt your snapshots in the destination Amazon Web Services Region.
- name: destinationRegion
value: "{{ destinationRegion }}"
description: |
The destination Amazon Web Services Region that you want to copy snapshots to.
- name: namespaceName
value: "{{ namespaceName }}"
description: |
The name of the namespace to copy snapshots from.
- name: snapshotRetentionPeriod
value: {{ snapshotRetentionPeriod }}
description: |
The retention period of the snapshots that you copy to the destination Amazon Web Services Region.
UPDATE examples
- update_snapshot_copy_configuration
Updates a snapshot copy configuration.
UPDATE aws.redshift_serverless.snapshot_copy_configurations
SET
snapshotCopyConfigurationId = '{{ snapshotCopyConfigurationId }}',
snapshotRetentionPeriod = {{ snapshotRetentionPeriod }}
WHERE
region = '{{ region }}' --required
AND snapshotCopyConfigurationId = '{{ snapshotCopyConfigurationId }}' --required
RETURNING
snapshot_copy_configuration;
DELETE examples
- delete_snapshot_copy_configuration
Deletes a snapshot copy configuration
DELETE FROM aws.redshift_serverless.snapshot_copy_configurations
WHERE region = '{{ region }}' --required
;