Skip to main content

changed_blocks

Creates, updates, deletes, gets or lists a changed_blocks resource.

Overview

Namechanged_blocks
TypeResource
Idaws.ebs.changed_blocks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
block_sizeintegerThe size of the blocks in the snapshot, in bytes.
changed_blocksarrayAn array of objects containing information about the changed blocks.
expiry_timestring (date-time)The time when the BlockToken expires.
next_tokenstringThe token to use to retrieve the next page of results. This value is null when there are no more results to return. (pattern: <code>^[A-Za-z0-9+/=]+$</code>)
volume_sizeinteger (int64)The size of the volume in GB.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_changed_blocksselectsecond_snapshot_id, regionfirstSnapshotId, pageToken, maxResults, startingBlockIndexReturns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage. You should always retry requests that receive server (5xx) error responses, and ThrottlingException and RequestThrottledException client error responses. For more information see Error retries in the Amazon Elastic Compute Cloud User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
second_snapshot_idstringThe ID of the second snapshot to use for the comparison. The SecondSnapshotId parameter must be specified with a FirstSnapshotID parameter; otherwise, an error occurs.
firstSnapshotIdstringThe ID of the first snapshot to use for the comparison. The FirstSnapshotID parameter must be specified with a SecondSnapshotId parameter; otherwise, an error occurs.
maxResultsintegerThe maximum number of blocks to be returned by the request. Even if additional blocks can be retrieved from the snapshot, the request can return less blocks than MaxResults or an empty array of blocks. To retrieve the next set of blocks from the snapshot, make another request with the returned NextToken value. The value of NextToken is null when there are no more blocks to return.
pageTokenstringThe token to request the next page of results. If you specify NextToken, then StartingBlockIndex is ignored.
startingBlockIndexintegerThe 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. If you specify NextToken, then StartingBlockIndex is ignored.

SELECT examples

Returns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage. You should always retry requests that receive server (5xx) error responses, and ThrottlingException and RequestThrottledException client error responses. For more information see Error retries in the Amazon Elastic Compute Cloud User Guide.

SELECT
block_size,
changed_blocks,
expiry_time,
next_token,
volume_size
FROM aws.ebs.changed_blocks
WHERE second_snapshot_id = '{{ second_snapshot_id }}' -- required
AND region = '{{ region }}' -- required
AND firstSnapshotId = '{{ firstSnapshotId }}'
AND pageToken = '{{ pageToken }}'
AND maxResults = '{{ maxResults }}'
AND startingBlockIndex = '{{ startingBlockIndex }}'
;