GetSnapshotBlock - Amazon Elastic Block Store

GetSnapshotBlock

Returns the data in a block in an Amazon Elastic Block Store snapshot.

Request Syntax

GET /snapshots/snapshotId/blocks/blockIndex?blockToken=BlockToken HTTP/1.1

URI Request Parameters

The request requires the following URI parameters.

blockIndex

The block index of the block from which to get data.

Obtain the BlockIndex by running the ListChangedBlocks or ListSnapshotBlocks operations.

BlockToken

The block token of the block from which to get data.

Obtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks operations.

Length Constraints: Maximum length of 256.

Pattern: ^[A-Za-z0-9+/=]+$

snapshotId

The ID of the snapshot containing the block from which to get data.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^snap-[0-9a-f]+$

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 x-amz-Data-Length: DataLength x-amz-Checksum: Checksum x-amz-Checksum-Algorithm: ChecksumAlgorithm BlockData

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

Checksum

The checksum generated for the block, which is Base64 encoded.

Length Constraints: Maximum length of 64.

ChecksumAlgorithm

The algorithm used to generate the checksum for the block, such as SHA256.

Length Constraints: Maximum length of 32.

Valid Values: SHA256

DataLength

The size of the data in the block.

The response returns the following as the HTTP body.

BlockData

The data content of the block.

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404

ValidationException

The input fails to satisfy the constraints of the EBS direct APIs.

HTTP Status Code: 400

See Also

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