aws_sdk_ebs/client/get_snapshot_block.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetSnapshotBlock`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`snapshot_id(impl Into<String>)`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::snapshot_id) / [`set_snapshot_id(Option<String>)`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::set_snapshot_id):<br>required: **true**<br><p>The ID of the snapshot containing the block from which to get data.</p><important> <p>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 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebsapis-using-encryption.html"> Using encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </important><br>
7 /// - [`block_index(i32)`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::block_index) / [`set_block_index(Option<i32>)`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::set_block_index):<br>required: **true**<br><p>The block index of the block in which to read the data. A block index is a logical index in units of <code>512</code> KiB 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/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p><br>
8 /// - [`block_token(impl Into<String>)`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::block_token) / [`set_block_token(Option<String>)`](crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::set_block_token):<br>required: **true**<br><p>The block token of the block from which to get data. You can obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p><br>
9 /// - On success, responds with [`GetSnapshotBlockOutput`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput) with field(s):
10 /// - [`data_length(Option<i32>)`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput::data_length): <p>The size of the data in the block.</p>
11 /// - [`block_data(ByteStream)`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput::block_data): <p>The data content of the block.</p>
12 /// - [`checksum(Option<String>)`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput::checksum): <p>The checksum generated for the block, which is Base64 encoded.</p>
13 /// - [`checksum_algorithm(Option<ChecksumAlgorithm>)`](crate::operation::get_snapshot_block::GetSnapshotBlockOutput::checksum_algorithm): <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
14 /// - On failure, responds with [`SdkError<GetSnapshotBlockError>`](crate::operation::get_snapshot_block::GetSnapshotBlockError)
15 pub fn get_snapshot_block(&self) -> crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder {
16 crate::operation::get_snapshot_block::builders::GetSnapshotBlockFluentBuilder::new(self.handle.clone())
17 }
18}