describe_snapshot_attribute(**kwargs)¶Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.
For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Request Syntax
response = client.describe_snapshot_attribute(
    Attribute='productCodes'|'createVolumePermission',
    SnapshotId='string',
    DryRun=True|False
)
[REQUIRED]
The snapshot attribute you would like to view.
[REQUIRED]
The ID of the EBS snapshot.
DryRunOperation . Otherwise, it is UnauthorizedOperation .dict
Response Syntax
{
    'CreateVolumePermissions': [
        {
            'Group': 'all',
            'UserId': 'string'
        },
    ],
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'SnapshotId': 'string'
}
Response Structure
(dict) --
CreateVolumePermissions (list) --
The users and groups that have the permissions for creating volumes from the snapshot.
(dict) --
Describes the user or group to be added or removed from the list of create volume permissions for a volume.
Group (string) --
The group to be added or removed. The possible value is all .
UserId (string) --
The ID of the Amazon Web Services account to be added or removed.
ProductCodes (list) --
The product codes.
(dict) --
Describes a product code.
ProductCodeId (string) --
The product code.
ProductCodeType (string) --
The type of product code.
SnapshotId (string) --
The ID of the EBS snapshot.
Examples
This example describes the createVolumePermission attribute on a snapshot with the snapshot ID of snap-066877671789bd71b.
response = client.describe_snapshot_attribute(
    Attribute='createVolumePermission',
    SnapshotId='snap-066877671789bd71b',
)
print(response)
Expected Output:
{
    'CreateVolumePermissions': [
    ],
    'SnapshotId': 'snap-066877671789bd71b',
    'ResponseMetadata': {
        '...': '...',
    },
}