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 uses 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.

Valid Range: Minimum value of 0.

Required: Yes

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+/=]+$

Required: Yes

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]+$

Required: Yes

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.

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

ChecksumAlgorithm

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

Length Constraints: Maximum length of 32.

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

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.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

An internal error has occurred.

HTTP Status Code: 500

RequestThrottledException

The number of API requests has exceed the maximum allowed API request throttling limit.

HTTP Status Code: 400

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404

ServiceQuotaExceededException

Your current service quotas do not allow you to perform this action.

HTTP Status Code: 402

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: