Describe Snapshots operation for the Amazon EC2 REST adapter
The Describe Snapshots operation returns information about Amazon EBS snapshots available to the user.
You can modify the list of snapshots returned by specifying snapshot IDs, snapshot owners, or users with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which the user has create volume permissions. If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, the snapshot will not be included in the returned results. If you specify one or more snapshot owners, only snapshots from the specified owners and for which you have access are returned.
The results can include the Amazon Web Services (AWS) Account IDs of the specified owners, amazon for snapshots owned by Amazon, or self for snapshots that you own. If you specify a list of restorable users, only users that have create snapshot permissions for the snapshots are returned. You can specify AWS Account IDs (if you own the snapshot(s)), self for snapshots for which you own or have explicit permissions, or all for public snapshots.
The following figure shows a sample <items>
XML element for the Describe Snapshots operation.
Sample <items>
XML element for the Describe Snapshots operation
<items>
<item>
<parameters>
<snapshot-set>
<!--Zero or more repetition-->
<item>
<snapshot-id></snapshot-id>
</item>
</snapshot-set>
<!--Optional:-->
<owners-set>
<!--Zero or more repetition-->
<item>
<owner></owner>
</item>
</owners-set>
<!--Optional:-->
<restorable-by-set>
<!--Zero or more repetition-->
<item>
<user></user>
</item>
</restorable-by-set>
</parameters>
</item>
</items>
The following table shows adapter request elements for the Describe Snapshots operation.
Adapter request elements for the Describe Snapshots operation
Element | Definition | Required |
---|---|---|
<access-key> | Specifies the Amazon Web Services (AWS) access key You need to generate the AWS access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<secret-key> | Specifies the AWS secret access key You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<region> | Specifies the region with which you want the adapter to communicate Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions. Valid values:
| No |
| Contains the name of the operation: describe-snapshots | Yes |
| Specifies the set of Amazon EBS snapshots to be described | No |
| Specifies the set of owners who own the snapshots You can specify a single or multiple owners. Valid values: self, amazon, AWS Account ID | No |
| Specifies the set of users that can create volumes from the snapshot You must specify the Account ID of a user that can create volumes from the snapshot. Valid values: self, all, AWS Account ID | No |
| Specifies the ID of the Amazon EBS snapshot to be described | No |
The following figure shows a sample adapter request for the Describe Snapshots operation.
Sample adapter request for the Describe Snapshots operation
<amazon-ec2-rest-request>
<operation-name>describe-snapshots</operation-name>
<parameters>
<snapshot-set>
<item>
<snapshot-id>snap-a13e8690</snapshot-id>
</item>
<item>
<snapshot-id>snap-10348c21</snapshot-id>
</item>
<item>
<snapshot-id>snap-99cf03a8</snapshot-id>
</item>
</snapshot-set>
<owners-set>
<item>
<owner />
</item>
</owners-set>
<restorable-by-set>
<item>
<user />
</item>
</restorable-by-set>
</parameters>
</amazon-ec2-rest-request>
The following figure shows a sample adapter response for the Describe Snapshots operation.
Sample adapter response for the Describe Snapshots operation
<amazon-ec2-rest-response>
<metadata>
<status>success</status>
</metadata>
<DescribeSnapshotsResponse>
<snapshotSet>
<item>
<snapshotId>snap-99cf03a8</snapshotId>
<volumeId>vol-5b6fca73</volumeId>
<status>completed</status>
<startTime>Wed Jan 08 02:52:37 EST 2014</startTime>
<progress>100%</progress>
<ownerId>246495073671</ownerId>
<volumeSize>1</volumeSize>
<description>salo</description>
</item>
<item>
<snapshotId>snap-a13e8690</snapshotId>
<volumeId>vol-f017b4d8</volumeId>
<status>completed</status>
<startTime>Tue Jan 14 04:50:16 EST 2014</startTime>
<progress>100%</progress>
<ownerId>246495073671</ownerId>
<volumeSize>100</volumeSize>
<description>salo1</description>
</item>
<item>
<snapshotId>snap-10348c21</snapshotId>
<volumeId>vol-f017b4d8</volumeId>
<status>completed</status>
<startTime>Tue Jan 14 04:53:49 EST 2014</startTime>
<progress>100%</progress>
<ownerId>246495073671</ownerId>
<volumeSize>100</volumeSize>
<description>salo2</description>
</item>
</snapshotSet>
</DescribeSnapshotsResponse>
</amazon-ec2-rest-response>
Comments
Log in or register to comment.