2019/12/04 - Amazon Elastic Block Store - 3 new api methods
Changes Update ebs client to latest version
Returns the data in a block in an Amazon Elastic Block Store snapshot.
See also: AWS API Documentation
Request Syntax
client.get_snapshot_block( SnapshotId='string', BlockIndex=123, BlockToken='string' )
string
[REQUIRED]
The ID of the snapshot containing the block from which to get data.
integer
[REQUIRED]
The block index of the block from which to get data.
Obtain the block index by running the list changed blocks or list snapshot blocks operations.
string
[REQUIRED]
The block token of the block from which to get data.
Obtain the block token by running the list changed blocks or list snapshot blocks operations.
dict
Response Syntax
{ 'DataLength': 123, 'BlockData': StreamingBody(), 'Checksum': 'string', 'ChecksumAlgorithm': 'SHA256' }
Response Structure
(dict) --
DataLength (integer) --
The size of the data in the block.
BlockData (:class:`.StreamingBody`) --
The data content of the block.
Checksum (string) --
The checksum generated for the block.
ChecksumAlgorithm (string) --
The algorithm used to generate the checksum for the block, such as SHA256.
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.
See also: AWS API Documentation
Request Syntax
client.list_changed_blocks( FirstSnapshotId='string', SecondSnapshotId='string', NextToken='string', MaxResults=123, StartingBlockIndex=123 )
string
The ID of the first snapshot to use for the comparison.
string
[REQUIRED]
The ID of the second snapshot to use for the comparison.
string
The token to request the next page of results.
integer
The number of results to return.
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.
dict
Response Syntax
{ 'ChangedBlocks': [ { 'BlockIndex': 123, 'FirstBlockToken': 'string', 'SecondBlockToken': 'string' }, ], 'ExpiryTime': datetime(2015, 1, 1), 'VolumeSize': 123, 'BlockSize': 123, 'NextToken': 'string' }
Response Structure
(dict) --
ChangedBlocks (list) --
An array of objects containing information about the changed blocks.
(dict) --
A block of data in an Amazon Elastic Block Store snapshot that is different from another snapshot of the same volume/snapshot lineage.
BlockIndex (integer) --
The block index.
FirstBlockToken (string) --
The block token for the block index of the first snapshot ID specified in the list changed blocks operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.
SecondBlockToken (string) --
The block token for the block index of the second snapshot ID specified in the list changed blocks operation.
ExpiryTime (datetime) --
The time when the block token expires.
VolumeSize (integer) --
The size of the volume in GB.
BlockSize (integer) --
The size of the block.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
Returns the block indexes and block tokens for blocks in an Amazon Elastic Block Store snapshot.
See also: AWS API Documentation
Request Syntax
client.list_snapshot_blocks( SnapshotId='string', NextToken='string', MaxResults=123, StartingBlockIndex=123 )
string
[REQUIRED]
The ID of the snapshot from which to get block indexes and block tokens.
string
The token to request the next page of results.
integer
The number of results to return.
integer
The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.
dict
Response Syntax
{ 'Blocks': [ { 'BlockIndex': 123, 'BlockToken': 'string' }, ], 'ExpiryTime': datetime(2015, 1, 1), 'VolumeSize': 123, 'BlockSize': 123, 'NextToken': 'string' }
Response Structure
(dict) --
Blocks (list) --
An array of objects containing information about the blocks.
(dict) --
A block of data in an Amazon Elastic Block Store snapshot.
BlockIndex (integer) --
The block index.
BlockToken (string) --
The block token for the block index.
ExpiryTime (datetime) --
The time when the block token expires.
VolumeSize (integer) --
The size of the volume in GB.
BlockSize (integer) --
The size of the block.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.