changed_blocks
Creates, updates, deletes, gets or lists a changed_blocks resource.
Overview
| Name | changed_blocks |
| Type | Resource |
| Id | aws.ebs.changed_blocks |
Fields
The following fields are returned by SELECT queries:
- list_changed_blocks
| Name | Datatype | Description |
|---|---|---|
block_size | integer | The size of the blocks in the snapshot, in bytes. |
changed_blocks | array | An array of objects containing information about the changed blocks. |
expiry_time | string (date-time) | The time when the BlockToken expires. |
next_token | string | The 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_size | integer (int64) | The size of the volume in GB. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_changed_blocks | select | second_snapshot_id, region | firstSnapshotId, pageToken, maxResults, startingBlockIndex | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
second_snapshot_id | string | The ID of the second snapshot to use for the comparison. The SecondSnapshotId parameter must be specified with a FirstSnapshotID parameter; otherwise, an error occurs. |
firstSnapshotId | string | The ID of the first snapshot to use for the comparison. The FirstSnapshotID parameter must be specified with a SecondSnapshotId parameter; otherwise, an error occurs. |
maxResults | integer | The 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. |
pageToken | string | The token to request the next page of results. If you specify NextToken, then StartingBlockIndex is ignored. |
startingBlockIndex | integer | 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. If you specify NextToken, then StartingBlockIndex is ignored. |
SELECT examples
- list_changed_blocks
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 }}'
;