Skip to main content

snapshot_access

Creates, updates, deletes, gets or lists a snapshot_access resource.

Overview

Namesnapshot_access
TypeResource
Idaws.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:

NameAccessible byRequired ParamsOptional ParamsDescription
authorize_snapshot_accessupdateAccountWithRestoreAccess, regionSnapshotIdentifier, SnapshotArn, SnapshotClusterIdentifierAuthorizes 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_accessexecAccountWithRestoreAccess, regionSnapshotIdentifier, SnapshotArn, SnapshotClusterIdentifierRemoves 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.

NameDatatypeDescription
AccountWithRestoreAccessstringThe identifier of the Amazon Web Services account that can no longer restore the specified snapshot.
regionstringAWS region (default: us-east-1)
SnapshotArnstringThe Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.
SnapshotClusterIdentifierstringThe 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.
SnapshotIdentifierstringThe identifier of the snapshot that the account can no longer access.

UPDATE examples

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

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 }}'
;