DescribeSnapshotAttribute - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

DescribeSnapshotAttribute

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.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

Attribute

The snapshot attribute you would like to view.

Type: String

Valid Values: productCodes | createVolumePermission

Required: Yes

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

SnapshotId

The ID of the EBS snapshot.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

createVolumePermission

The users and groups that have the permissions for creating volumes from the snapshot.

Type: Array of CreateVolumePermission objects

productCodes

The product codes.

Type: Array of ProductCode objects

requestId

The ID of the request.

Type: String

snapshotId

The ID of the EBS snapshot.

Type: String

Errors

For information about the errors that are common to all actions, see Common client error codes.

Examples

Example

This example describes the create volume permissions for the specified snapshot.

Sample Request

https://ec2.amazonaws.com/?Action=DescribeSnapshotAttribute &SnapshotId=snap-1234567890abcdef0 &Attribute=createVolumePermission &AUTHPARAMS

Sample Response

<DescribeSnapshotAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <snapshotId>snap-1234567890abcdef0</snapshotId> <createVolumePermission> <item> <group>all</group> </item> </createVolumePermission> </DescribeSnapshotAttributeResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: