Table of Contents
A low-level client representing Amazon Elastic Block Store (EBS):
import boto3
client = boto3.client('ebs')
These are the available methods:
Check if an operation can be paginated.
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns the data in a block in an Amazon Elastic Block Store snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_snapshot_block(
SnapshotId='string',
BlockIndex=123,
BlockToken='string'
)
[REQUIRED]
The ID of the snapshot containing the block from which to get data.
[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.
[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 (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 an object that can wait for some condition.
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
response = client.list_changed_blocks(
FirstSnapshotId='string',
SecondSnapshotId='string',
NextToken='string',
MaxResults=123,
StartingBlockIndex=123
)
[REQUIRED]
The ID of the second snapshot to use for the comparison.
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
response = client.list_snapshot_blocks(
SnapshotId='string',
NextToken='string',
MaxResults=123,
StartingBlockIndex=123
)
[REQUIRED]
The ID of the snapshot from which to get block indexes and block tokens.
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.
The available paginators are: