ListChangedBlocks - Amazon Elastic Block Store

ListChangedBlocks

Returns the block indexes and block tokens for blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.

Request Syntax

GET /snapshots/secondSnapshotId/changedblocks?firstSnapshotId=FirstSnapshotId&maxResults=MaxResults&pageToken=NextToken&startingBlockIndex=StartingBlockIndex HTTP/1.1

URI Request Parameters

The request requires the following URI parameters.

FirstSnapshotId

The ID of the first snapshot to use for the comparison.

Important

The FirstSnapshotID parameter must be specified with a SecondSnapshotId parameter; otherwise, an error occurs.

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

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

MaxResults

The number of results to return.

Valid Range: Minimum value of 100. Maximum value of 10000.

NextToken

The token to request the next page of results.

Length Constraints: Maximum length of 256.

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

secondSnapshotId

The ID of the second snapshot to use for the comparison.

Important

The SecondSnapshotId parameter must be specified with a FirstSnapshotID parameter; otherwise, an error occurs.

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

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

StartingBlockIndex

The block index from which the comparison should start.

The list in the response will start from this block index or the next valid block index in the snapshots.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "BlockSize": number, "ChangedBlocks": [ { "BlockIndex": number, "FirstBlockToken": "string", "SecondBlockToken": "string" } ], "ExpiryTime": number, "NextToken": "string", "VolumeSize": number }

Response Elements

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

The following data is returned in JSON format by the service.

BlockSize

The size of the block.

Type: Integer

ChangedBlocks

An array of objects containing information about the changed blocks.

Type: Array of ChangedBlock objects

ExpiryTime

The time when the BlockToken expires.

Type: Timestamp

NextToken

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Type: String

Length Constraints: Maximum length of 256.

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

VolumeSize

The size of the volume in GB.

Type: Long

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: