snapshots
Creates, updates, deletes, gets or lists a snapshots resource.
Overview
| Name | snapshots |
| Type | Resource |
| Id | aws.redshift_serverless.snapshots |
Fields
The following fields are returned by SELECT queries:
- get_snapshot
- list_snapshots
| Name | Datatype | Description |
|---|---|---|
accounts_with_provisioned_restore_access | array | All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster. |
accounts_with_restore_access | array | All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace. |
actual_incremental_backup_size_in_mega_bytes | number (double) | The size of the incremental backup in megabytes. |
admin_password_secret_arn | string | The Amazon Resource Name (ARN) for the namespace's admin user credentials secret. |
admin_password_secret_kms_key_id | string | The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret. |
admin_username | string | The username of the database within a snapshot. |
backup_progress_in_mega_bytes | number (double) | The size in megabytes of the data that has been backed up to a snapshot. |
current_backup_rate_in_mega_bytes_per_second | number (double) | The rate at which data is backed up into a snapshot in megabytes per second. |
elapsed_time_in_seconds | integer (int64) | The amount of time it took to back up data into a snapshot. |
estimated_seconds_to_completion | integer (int64) | The estimated amount of seconds until the snapshot completes backup. |
kms_key_id | string | The unique identifier of the KMS key used to encrypt the snapshot. |
namespace_arn | string | The Amazon Resource Name (ARN) of the namespace the snapshot was created from. |
namespace_name | string | The name of the namepsace. |
owner_account | string | The owner Amazon Web Services; account of the snapshot. |
snapshot_arn | string | The Amazon Resource Name (ARN) of the snapshot. |
snapshot_create_time | string (date-time) | The timestamp of when the snapshot was created. |
snapshot_name | string | The name of the snapshot. |
snapshot_remaining_days | integer | The amount of days until the snapshot is deleted. |
snapshot_retention_period | integer | The period of time, in days, of how long the snapshot is retained. |
snapshot_retention_start_time | string (date-time) | The timestamp of when data within the snapshot started getting retained. |
status | string | The status of the snapshot. (AVAILABLE, CREATING, DELETED, CANCELLED, FAILED, COPYING) |
total_backup_size_in_mega_bytes | number (double) | The total size, in megabytes, of how big the snapshot is. |
| Name | Datatype | Description |
|---|---|---|
accounts_with_provisioned_restore_access | array | All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster. |
accounts_with_restore_access | array | All of the Amazon Web Services accounts that have access to restore a snapshot to a namespace. |
actual_incremental_backup_size_in_mega_bytes | number (double) | The size of the incremental backup in megabytes. |
admin_password_secret_arn | string | The Amazon Resource Name (ARN) for the namespace's admin user credentials secret. |
admin_password_secret_kms_key_id | string | The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret. |
admin_username | string | The username of the database within a snapshot. |
backup_progress_in_mega_bytes | number (double) | The size in megabytes of the data that has been backed up to a snapshot. |
current_backup_rate_in_mega_bytes_per_second | number (double) | The rate at which data is backed up into a snapshot in megabytes per second. |
elapsed_time_in_seconds | integer (int64) | The amount of time it took to back up data into a snapshot. |
estimated_seconds_to_completion | integer (int64) | The estimated amount of seconds until the snapshot completes backup. |
kms_key_id | string | The unique identifier of the KMS key used to encrypt the snapshot. |
namespace_arn | string | The Amazon Resource Name (ARN) of the namespace the snapshot was created from. |
namespace_name | string | The name of the namepsace. |
owner_account | string | The owner Amazon Web Services; account of the snapshot. |
snapshot_arn | string | The Amazon Resource Name (ARN) of the snapshot. |
snapshot_create_time | string (date-time) | The timestamp of when the snapshot was created. |
snapshot_name | string | The name of the snapshot. |
snapshot_remaining_days | integer | The amount of days until the snapshot is deleted. |
snapshot_retention_period | integer | The period of time, in days, of how long the snapshot is retained. |
snapshot_retention_start_time | string (date-time) | The timestamp of when data within the snapshot started getting retained. |
status | string | The status of the snapshot. (AVAILABLE, CREATING, DELETED, CANCELLED, FAILED, COPYING) |
total_backup_size_in_mega_bytes | number (double) | The total size, in megabytes, of how big the snapshot is. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_snapshot | select | region | Returns information about a specific snapshot. | |
list_snapshots | select | region | Returns a list of snapshots. | |
create_snapshot | insert | region, namespaceName, snapshotName | Creates a snapshot of all databases in a namespace. For more information about snapshots, see Working with snapshots and recovery points. | |
update_snapshot | update | region, snapshotName | Updates a snapshot. | |
delete_snapshot | delete | region | Deletes a snapshot from Amazon Redshift Serverless. |
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
- get_snapshot
- list_snapshots
Returns information about a specific snapshot.
SELECT
accounts_with_provisioned_restore_access,
accounts_with_restore_access,
actual_incremental_backup_size_in_mega_bytes,
admin_password_secret_arn,
admin_password_secret_kms_key_id,
admin_username,
backup_progress_in_mega_bytes,
current_backup_rate_in_mega_bytes_per_second,
elapsed_time_in_seconds,
estimated_seconds_to_completion,
kms_key_id,
namespace_arn,
namespace_name,
owner_account,
snapshot_arn,
snapshot_create_time,
snapshot_name,
snapshot_remaining_days,
snapshot_retention_period,
snapshot_retention_start_time,
status,
total_backup_size_in_mega_bytes
FROM aws.redshift_serverless.snapshots
WHERE region = '{{ region }}' -- required
;
Returns a list of snapshots.
SELECT
accounts_with_provisioned_restore_access,
accounts_with_restore_access,
actual_incremental_backup_size_in_mega_bytes,
admin_password_secret_arn,
admin_password_secret_kms_key_id,
admin_username,
backup_progress_in_mega_bytes,
current_backup_rate_in_mega_bytes_per_second,
elapsed_time_in_seconds,
estimated_seconds_to_completion,
kms_key_id,
namespace_arn,
namespace_name,
owner_account,
snapshot_arn,
snapshot_create_time,
snapshot_name,
snapshot_remaining_days,
snapshot_retention_period,
snapshot_retention_start_time,
status,
total_backup_size_in_mega_bytes
FROM aws.redshift_serverless.snapshots
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_snapshot
- Manifest
Creates a snapshot of all databases in a namespace. For more information about snapshots, see Working with snapshots and recovery points.
INSERT INTO aws.redshift_serverless.snapshots (
namespaceName,
retentionPeriod,
snapshotName,
tags,
region
)
SELECT
'{{ namespaceName }}' /* required */,
{{ retentionPeriod }},
'{{ snapshotName }}' /* required */,
'{{ 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: namespaceName
value: "{{ namespaceName }}"
description: |
The namespace to create a snapshot for.
- name: retentionPeriod
value: {{ retentionPeriod }}
description: |
How long to retain the created snapshot.
- name: snapshotName
value: "{{ snapshotName }}"
description: |
The name of the snapshot.
- name: tags
description: |
An array of Tag objects to associate with the snapshot.
value:
- key: "{{ key }}"
value: "{{ value }}"
UPDATE examples
- update_snapshot
Updates a snapshot.
UPDATE aws.redshift_serverless.snapshots
SET
retentionPeriod = {{ retentionPeriod }},
snapshotName = '{{ snapshotName }}'
WHERE
region = '{{ region }}' --required
AND snapshotName = '{{ snapshotName }}' --required
RETURNING
snapshot;
DELETE examples
- delete_snapshot
Deletes a snapshot from Amazon Redshift Serverless.
DELETE FROM aws.redshift_serverless.snapshots
WHERE region = '{{ region }}' --required
;