1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`PutSnapshotBlock`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`snapshot_id(impl Into<String>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::snapshot_id) / [`set_snapshot_id(Option<String>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_snapshot_id): <p>The ID of the snapshot.</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>
    ///   - [`block_index(i32)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::block_index) / [`set_block_index(Option<i32>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_block_index): <p>The block index of the block in which to write 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>
    ///   - [`block_data(ByteStream)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::block_data) / [`set_block_data(ByteStream)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_block_data): <p>The data to write to the block.</p>  <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
    ///   - [`data_length(i32)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::data_length) / [`set_data_length(Option<i32>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_data_length): <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code> bytes.</p>  <p>Valid values: <code>524288</code> </p>
    ///   - [`progress(i32)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::progress) / [`set_progress(Option<i32>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_progress): <p>The progress of the write process, as a percentage.</p>
    ///   - [`checksum(impl Into<String>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::checksum) / [`set_checksum(Option<String>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_checksum): <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
    ///   - [`checksum_algorithm(ChecksumAlgorithm)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::checksum_algorithm) / [`set_checksum_algorithm(Option<ChecksumAlgorithm>)`](crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::set_checksum_algorithm): <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
    /// - On success, responds with [`PutSnapshotBlockOutput`](crate::operation::put_snapshot_block::PutSnapshotBlockOutput) with field(s):
    ///   - [`checksum(Option<String>)`](crate::operation::put_snapshot_block::PutSnapshotBlockOutput::checksum): <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
    ///   - [`checksum_algorithm(Option<ChecksumAlgorithm>)`](crate::operation::put_snapshot_block::PutSnapshotBlockOutput::checksum_algorithm): <p>The algorithm used by Amazon EBS to generate the checksum.</p>
    /// - On failure, responds with [`SdkError<PutSnapshotBlockError>`](crate::operation::put_snapshot_block::PutSnapshotBlockError)
    pub fn put_snapshot_block(
        &self,
    ) -> crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder {
        crate::operation::put_snapshot_block::builders::PutSnapshotBlockFluentBuilder::new(
            self.handle.clone(),
        )
    }
}