Create Snapshot operation for the Amazon EC2 REST adapter
The Create Snapshot operation enables you to create a snapshot of an Amazon EBS volume and store it in Amazon S3. You can use a snapshot for backup, to make identical copies of instance devices, and to save data before shutting down an instance.
The following figure shows a sample <items> XML element for the Create Snapshot operation.
Sample <items> XML element for the Create Snapshot operation
<item>
<parameters>
<volume-id></volume-id>
<!--Optional:-->
<description></description>
</parameters>
</item>
</items>
The following table shows adapter request elements for the Create Snapshot operation.
Adapter request elements for the Create Snapshot 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;
|
<session-token> | Specifies the temporary session token generated using the AWS APIs. | Conditional; You must specify the Access Key and Secret Key as well in the configuration or the adapter request, else the <session-token> value is ignored. |
<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 |
<operation-name> | Contains the name of the operation: create-snapshot | Yes |
<volume-id> | Specifies the ID of the Amazon EBS volume of which you want to take a snapshot | Yes |
<description> | Describes the Amazon EBS snapshot | No |
The following figure shows a sample adapter request for the Create Snapshot operation.
Sample adapter request for the Create Snapshot operation
<operation-name>create-snapshot</operation-name>
<parameters>
<volume-id>vol-f017b4d8</volume-id>
<description>salo1</description>
</parameters>
</amazon-ec2-rest-request>
The following figure shows a sample adapter response for the Create Snapshot operation.
Sample adapter response for the Create Snapshot operation
<metadata>
<status>success</status>
</metadata>
<CreateSnapshotResponse>
<snapshotId>snap-a13e8690</snapshotId>
<volumeId>vol-f017b4d8</volumeId>
<status>pending</status>
<startTime>Tue Jan 14 04:50:16 EST 2014</startTime>
<progress></progress>
<ownerId>246495073671</ownerId>
<volumeSize>100</volumeSize>
<description>salo1</description>
</CreateSnapshotResponse>
</amazon-ec2-rest-response>