recovery_points
Creates, updates, deletes, gets or lists a recovery_points resource.
Overview
| Name | recovery_points |
| Type | Resource |
| Id | aws.redshift_serverless.recovery_points |
Fields
The following fields are returned by SELECT queries:
- get_recovery_point
- list_recovery_points
| Name | Datatype | Description |
|---|---|---|
namespace_arn | string | The Amazon Resource Name (ARN) of the namespace the recovery point is associated with. |
namespace_name | string | The name of the namespace the recovery point is associated with. (pattern: <code>^[a-z0-9-]+$</code>) |
recovery_point_create_time | string (date-time) | The time the recovery point is created. |
recovery_point_id | string | The unique identifier of the recovery point. |
total_size_in_mega_bytes | number (double) | The total size of the data in the recovery point in megabytes. |
workgroup_name | string | The name of the workgroup the recovery point is associated with. (pattern: <code>^[a-z0-9-]+$</code>) |
| Name | Datatype | Description |
|---|---|---|
namespace_arn | string | The Amazon Resource Name (ARN) of the namespace the recovery point is associated with. |
namespace_name | string | The name of the namespace the recovery point is associated with. (pattern: <code>^[a-z0-9-]+$</code>) |
recovery_point_create_time | string (date-time) | The time the recovery point is created. |
recovery_point_id | string | The unique identifier of the recovery point. |
total_size_in_mega_bytes | number (double) | The total size of the data in the recovery point in megabytes. |
workgroup_name | string | The name of the workgroup the recovery point is associated with. (pattern: <code>^[a-z0-9-]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_recovery_point | select | region | Returns information about a recovery point. | |
list_recovery_points | select | region | Returns an array of recovery points. | |
convert_recovery_point_to_snapshot | exec | region, recoveryPointId, snapshotName | Converts a recovery point to a snapshot. For more information about recovery points and snapshots, see Working with snapshots and recovery points. | |
restore_from_recovery_point | exec | region, namespaceName, recoveryPointId, workgroupName | Restore the data from a recovery point. | |
restore_table_from_recovery_point | exec | region, namespaceName, newTableName, recoveryPointId, sourceDatabaseName, sourceTableName, workgroupName | Restores a table from a recovery point to your Amazon Redshift Serverless instance. You can't use this operation to restore tables with interleaved sort keys. |
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_recovery_point
- list_recovery_points
Returns information about a recovery point.
SELECT
namespace_arn,
namespace_name,
recovery_point_create_time,
recovery_point_id,
total_size_in_mega_bytes,
workgroup_name
FROM aws.redshift_serverless.recovery_points
WHERE region = '{{ region }}' -- required
;
Returns an array of recovery points.
SELECT
namespace_arn,
namespace_name,
recovery_point_create_time,
recovery_point_id,
total_size_in_mega_bytes,
workgroup_name
FROM aws.redshift_serverless.recovery_points
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- convert_recovery_point_to_snapshot
- restore_from_recovery_point
- restore_table_from_recovery_point
Converts a recovery point to a snapshot. For more information about recovery points and snapshots, see Working with snapshots and recovery points.
EXEC aws.redshift_serverless.recovery_points.convert_recovery_point_to_snapshot
@region='{{ region }}' --required
@@json=
'{
"recoveryPointId": "{{ recoveryPointId }}",
"retentionPeriod": {{ retentionPeriod }},
"snapshotName": "{{ snapshotName }}",
"tags": "{{ tags }}"
}'
;
Restore the data from a recovery point.
EXEC aws.redshift_serverless.recovery_points.restore_from_recovery_point
@region='{{ region }}' --required
@@json=
'{
"maintainIntegration": {{ maintainIntegration }},
"namespaceName": "{{ namespaceName }}",
"recoveryPointId": "{{ recoveryPointId }}",
"workgroupName": "{{ workgroupName }}"
}'
;
Restores a table from a recovery point to your Amazon Redshift Serverless instance. You can't use this operation to restore tables with interleaved sort keys.
EXEC aws.redshift_serverless.recovery_points.restore_table_from_recovery_point
@region='{{ region }}' --required
@@json=
'{
"activateCaseSensitiveIdentifier": {{ activateCaseSensitiveIdentifier }},
"namespaceName": "{{ namespaceName }}",
"newTableName": "{{ newTableName }}",
"recoveryPointId": "{{ recoveryPointId }}",
"sourceDatabaseName": "{{ sourceDatabaseName }}",
"sourceSchemaName": "{{ sourceSchemaName }}",
"sourceTableName": "{{ sourceTableName }}",
"targetDatabaseName": "{{ targetDatabaseName }}",
"targetSchemaName": "{{ targetSchemaName }}",
"workgroupName": "{{ workgroupName }}"
}'
;