Describe Snapshots operation


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

<wsdl-location>

Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2

Examples:

Conditional:

  • Required if not specified in the request
  • If specified in the configuration and request, the value in the request overrides the value in the configuration
<endpoint-address>

Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions
Default value: US East region: http://us-east-1.ec2.amazonaws.com/

No

<signature-properties>

Specifies the mode for signing the adapter request

Conditional:

  • Required if not specified in the configuration
  • If <signature-properties mode = "key-files">, requires <private-key-file>
     and <certificate-file>
  • If <signature-properties mode = "key-data">, requires <private-key-data> and <certificate-data>
<operation-name>

Contains the name of the operation: describe-snapshots

Yes

<snapshot-set>

Specifies the set of Amazon EBS snapshots to be described

No

<owners-set>

Specifies the set of owners that can create volumes from the instance
This element returns snapshots owned by the specified owner.
Valid Values: self, amazon, AWS Account ID

No

<restorable-by-set>

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.

No

<snapshot-id>

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-request>
   <wsdl-location>http://ec2.amazonaws.com/doc/2009-11-30/</wsdl-location>
   <endpoint-address>http://us-east-1.ec2.amazonaws.com/</endpoint-address>
   <signature-properties mode = "key-files">
       <private-key-file>C:\Security\
pk-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</private-key-file>
       <certificate-file>C:\Security\
cert-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</certificate-file>
   </signature-properties>
   <operation-name>describe-snapshots</operation-name>
   <parameters>
       <snapshot-set>
           <!--Zero or more repetition-->
           <item>
               <snapshot-id>snap-62a6700a</snapshot-id>
           </item>
       </snapshot-set>
   </parameters>
</amazon-ec2-request>

The following figure shows a sample adapter response for the Describe Snapshots operation. 

Sample adapter response for the Describe Snapshots operation

<amazon-ec2-response>
   <metadata>
       <status>success</status>
   </metadata>
   <DescribeSnapshotsResponse>
       <requestId>64fda38a-6fd4-4ccf-a592-a5eaec156da5</requestId>
       <snapshotSet>
           <item>
               <snapshotId>snap-62a6700a</snapshotId>
               <volumeId>vol-679d280e</volumeId>
               <status>completed</status>
               <startTime>2010-04-20T08:06:25.000Z</startTime>
               <progress>100%</progress>
               <ownerId>622872856407</ownerId>
               <volumeSize>1</volumeSize>
               <description>Test Description</description>
           </item>
       </snapshotSet>
   </DescribeSnapshotsResponse>
</amazon-ec2-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*