get_snapshot_block
¶
get_snapshot_block(
snapshot_id: SnapshotId,
block_index: BlockIndex,
block_token: BlockToken,
*,
config_overrides: Optional[EBSClientConfig] = None,
) -> Generator[GetSnapshotBlockResponse]
Returns the data in a block in an Amazon Elastic Block Store snapshot.
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:
-
snapshot_id(SnapshotId) –The ID of the snapshot containing the block from which to get data.
If the specified snapshot is encrypted, you must have permission to use the KMS key that was used to encrypt the snapshot. For more information, see Using encryption in the Amazon Elastic Compute Cloud User Guide.
-
block_index(BlockIndex) –The block index of the block in which to read the data. A block index is a logical index in units of
512KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/524288). The logical offset of the data must be512KiB aligned. -
block_token(BlockToken) –The block token of the block from which to get data. You can obtain the
BlockTokenby running theListChangedBlocksorListSnapshotBlocksoperations.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–An internal error has occurred. For more information see Error retries.
-
RequestThrottledException–The number of API requests has exceeded the maximum allowed API request throttling limit for the snapshot. For more information see Error retries.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–Your current service quotas do not allow you to perform this action.
-
ValidationException–The input fails to satisfy the constraints of the EBS direct APIs.
-
UnknownServiceError–The service returned an error code this client does not model.