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, DescribeDBSnapshotAttributes returns the restore attribute and a list of IDs for the Amazon Web Services accounts that are authorized to copy or restore the manual DB snapshot. If all is included in the list of values for the restore attribute, 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 ModifyDBSnapshotAttribute API 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 DescribeDBSnapshotAttributes API 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 ModifyDBSnapshotAttribute API 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 ModifyDBSnapshotAttribute API.

          • AttributeName (string) –

            The name of the manual DB snapshot attribute.

            The attribute named restore refers to the list of Amazon Web Services accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBSnapshotAttribute API action.

          • AttributeValues (list) –

            The value or values for the manual DB snapshot attribute.

            If the AttributeName field is set to restore, 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 of all is 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': {
        '...': '...',
    },
}