| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
This operation initiates a snapshot of a volume.
AWS Storage Gateway provides the ability to back up point-in-time snapshots of your data to Amazon Simple Storage (Amazon S3) for durable off-site recovery, as well as import the data to an Amazon Elastic Block Store (EBS) volume in Amazon Elastic Compute Cloud (Amazon EC2). You can take snapshots of your gateway volume on a scheduled or ad-hoc basis. This API enables you to take an ad-hoc snapshot. For more information, see Working with Snapshots.
In the CreateSnapshot request you identify the volume by providing its Amazon
Resource Name (ARN). You must also provide description for the snapshot. When AWS
Storage Gateway takes the snapshot of specified volume, the snapshot and its description
appear in the AWS Storage Gateway console.
In response, AWS Storage
Gateway returns you a snapshot ID. You can use this snapshot ID to check the snapshot
progress or later use it when you want to create a volume from a snapshot.
Note
To list or delete a snapshot, you must use the Amazon EC2 API. For more information, go to DeleteSnapshot and DescribeSnapshots in Amazon Elastic Compute Cloud API Reference.
POST / HTTP/1.1 Host: storagegateway.region.amazonaws.com Authorization:authorizationContent-Type: application/x-amz-json-1.1 x-amz-date:datex-amz-target: StorageGateway_20120630.CreateSnapshot { "VolumeARN": "String", "SnapshotDescription": "String" }
Textual description of the snapshot that appears in the Amazon EC2 console, Elastic Block Store snapshots panel in the Description field, and in the AWS Storage Gateway snapshot Details pane, Description field
Length: Minimum length of 1. Maximum length of 255.
Required: yes
Type: String
The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.
Required: yes
Type: String
HTTP/1.1 200 OK x-amzn-RequestId: x-amzn-RequestId Content-Type: application/x-amz-json-1.1 Content-length: payloadLength Date: date { "VolumeARN": "String", "SnapshotId": "String" }
The snapshot ID that is used to refer to the snapshot in future operations such as describing snapshots (Amazon Elastic Compute Cloud API DescribeSnapshots) or creating a volume from a snapshot (CreateStorediSCSIVolume).
Type: String
The Amazon Resource Name (ARN) of the volume of which the snapshot was taken. Use ListVolumes to get volume ARNs of a gateway.
Type: String
This operation returns the following error codes in addition to exceptions common to all operations. For information about these errors and common exceptions, see Error Responses.
GatewayInternalError
GatewayNotConnected
GatewayNotFound
GatewayProxyNetworkConnectionBusy
InternalError
InvalidParameters
NotSupported
VolumeNotFound
VolumeNotReady
The following example sends a CreateSnapshot request to take snapshot of the
specified an example volume.
POST / HTTP/1.1
Host: storagegateway.us-east-1.amazonaws.com
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120425/us-east-1/storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=9cd5a3584d1d67d57e61f120f35102d6b3649066abdd4bf4bbcf05bd9f2f8fe2
x-amz-date: 20120912T120000Z
x-amz-target: StorageGateway_20120630.CreateSnapshot
{
"VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/mygateway/volume/vol-1122AABB",
"SnapshotDescription": "snapshot description"
}HTTP/1.1 200 OK
x-amzn-RequestId: gur28r2rqlgb8vvs0mq17hlgij1q8glle1qeu3kpgg6f0kstauu0
Date: Wed, 12 Sep 2012 12:00:02 GMT
Content-Type: application/x-amz-json-1.1
Content-length: 137
{
"VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/mygateway/volume/vol-1122AABB",
"SnapshotId": "snap-78e22663"
}