RDS / Client / describe_db_snapshot_attributes
describe_db_snapshot_attributes#
- RDS.Client.describe_db_snapshot_attributes(**kwargs)#
Returns a list of DB snapshot attribute names and values for a manual DB snapshot.
When sharing snapshots with other Amazon Web Services accounts,
DescribeDBSnapshotAttributesreturns therestoreattribute and a list of IDs for the Amazon Web Services accounts that are authorized to copy or restore the manual DB snapshot. Ifallis included in the list of values for therestoreattribute, then the manual DB snapshot is public and can be copied or restored by all Amazon Web Services accounts.To add or remove access for an Amazon Web Services account to copy or restore a manual DB snapshot, or to make the manual DB snapshot public or private, use the
ModifyDBSnapshotAttributeAPI action.See also: AWS API Documentation
Request Syntax
response = client.describe_db_snapshot_attributes( DBSnapshotIdentifier='string' )
- Parameters:
DBSnapshotIdentifier (string) –
[REQUIRED]
The identifier for the DB snapshot to describe the attributes for.
- Return type:
dict
- Returns:
Response Syntax
{ 'DBSnapshotAttributesResult': { 'DBSnapshotIdentifier': 'string', 'DBSnapshotAttributes': [ { 'AttributeName': 'string', 'AttributeValues': [ 'string', ] }, ] } }
Response Structure
(dict) –
DBSnapshotAttributesResult (dict) –
Contains the results of a successful call to the
DescribeDBSnapshotAttributesAPI action.Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to copy or restore a manual DB snapshot. For more information, see the
ModifyDBSnapshotAttributeAPI action.DBSnapshotIdentifier (string) –
The identifier of the manual DB snapshot that the attributes apply to.
DBSnapshotAttributes (list) –
The list of attributes and values for the manual DB snapshot.
(dict) –
Contains the name and values of a manual DB snapshot attribute
Manual DB snapshot attributes are used to authorize other Amazon Web Services accounts to restore a manual DB snapshot. For more information, see the
ModifyDBSnapshotAttributeAPI.AttributeName (string) –
The name of the manual DB snapshot attribute.
The attribute named
restorerefers to the list of Amazon Web Services accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see theModifyDBSnapshotAttributeAPI action.AttributeValues (list) –
The value or values for the manual DB snapshot attribute.
If the
AttributeNamefield is set torestore, then this element returns a list of IDs of the Amazon Web Services accounts that are authorized to copy or restore the manual DB snapshot. If a value ofallis in the list, then the manual DB snapshot is public and available for any Amazon Web Services account to copy or restore.(string) –
Exceptions
RDS.Client.exceptions.DBSnapshotNotFoundFault
Examples
This example lists attributes for the specified DB snapshot.
response = client.describe_db_snapshot_attributes( DBSnapshotIdentifier='mydbsnapshot', ) print(response)
Expected Output:
{ 'DBSnapshotAttributesResult': { }, 'ResponseMetadata': { '...': '...', }, }