snapshot_access
Creates, updates, deletes, gets or lists a snapshot_access resource.
Overview
| Name | snapshot_access |
| Type | Resource |
| Id | aws.redshift.snapshot_access |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
authorize_snapshot_access | update | AccountWithRestoreAccess, region | SnapshotIdentifier, SnapshotArn, SnapshotClusterIdentifier | Authorizes the specified Amazon Web Services account to restore the specified snapshot. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide. |
revoke_snapshot_access | exec | AccountWithRestoreAccess, region | SnapshotIdentifier, SnapshotArn, SnapshotClusterIdentifier | Removes the ability of the specified Amazon Web Services account to restore the specified snapshot. If the account is currently restoring the snapshot, the restore will run to completion. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide. |
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 |
|---|---|---|
AccountWithRestoreAccess | string | The identifier of the Amazon Web Services account that can no longer restore the specified snapshot. |
region | string | AWS region (default: us-east-1) |
SnapshotArn | string | The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access. |
SnapshotClusterIdentifier | string | The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name. |
SnapshotIdentifier | string | The identifier of the snapshot that the account can no longer access. |
UPDATE examples
- authorize_snapshot_access
Authorizes the specified Amazon Web Services account to restore the specified snapshot. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.
UPDATE aws.redshift.snapshot_access
SET
-- No updatable properties
WHERE
AccountWithRestoreAccess = '{{ AccountWithRestoreAccess }}' --required
AND region = '{{ region }}' --required
AND SnapshotIdentifier = '{{ SnapshotIdentifier}}'
AND SnapshotArn = '{{ SnapshotArn}}'
AND SnapshotClusterIdentifier = '{{ SnapshotClusterIdentifier}}'
RETURNING
accounts_with_restore_access,
actual_incremental_backup_size_in_mega_bytes,
availability_zone,
backup_progress_in_mega_bytes,
cluster_create_time,
cluster_identifier,
cluster_version,
current_backup_rate_in_mega_bytes_per_second,
db_name,
elapsed_time_in_seconds,
encrypted,
encrypted_with_hsm,
engine_full_version,
enhanced_vpc_routing,
estimated_seconds_to_completion,
kms_key_id,
maintenance_track_name,
manual_snapshot_remaining_days,
manual_snapshot_retention_period,
master_password_secret_arn,
master_password_secret_kms_key_id,
master_username,
node_type,
number_of_nodes,
owner_account,
port,
restorable_node_types,
snapshot_arn,
snapshot_create_time,
snapshot_identifier,
snapshot_retention_start_time,
snapshot_type,
source_region,
status,
tags,
total_backup_size_in_mega_bytes,
vpc_id;
Lifecycle Methods
- revoke_snapshot_access
Removes the ability of the specified Amazon Web Services account to restore the specified snapshot. If the account is currently restoring the snapshot, the restore will run to completion. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.
EXEC aws.redshift.snapshot_access.revoke_snapshot_access
@AccountWithRestoreAccess='{{ AccountWithRestoreAccess }}' --required,
@region='{{ region }}' --required,
@SnapshotIdentifier='{{ SnapshotIdentifier }}',
@SnapshotArn='{{ SnapshotArn }}',
@SnapshotClusterIdentifier='{{ SnapshotClusterIdentifier }}'
;