Struct aws_sdk_ebs::client::fluent_builders::PutSnapshotBlock
source · [−]pub struct PutSnapshotBlock { /* private fields */ }Expand description
Fluent builder constructing a request to PutSnapshotBlock.
Writes a block of data to a snapshot. If the specified block contains data, the existing data is overwritten. The target snapshot must be in the pending state.
Data written to a snapshot must be aligned with 512-KiB sectors.
Implementations
sourceimpl PutSnapshotBlock
impl PutSnapshotBlock
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PutSnapshotBlock, AwsResponseRetryClassifier>, SdkError<PutSnapshotBlockError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PutSnapshotBlock, AwsResponseRetryClassifier>, SdkError<PutSnapshotBlockError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<PutSnapshotBlockOutput, SdkError<PutSnapshotBlockError>>
pub async fn send(
self
) -> Result<PutSnapshotBlockOutput, SdkError<PutSnapshotBlockError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn snapshot_id(self, input: impl Into<String>) -> Self
pub fn snapshot_id(self, input: impl Into<String>) -> Self
The ID of the snapshot.
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..
sourcepub fn set_snapshot_id(self, input: Option<String>) -> Self
pub fn set_snapshot_id(self, input: Option<String>) -> Self
The ID of the snapshot.
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..
sourcepub fn block_index(self, input: i32) -> Self
pub fn block_index(self, input: i32) -> Self
The block index of the block in which to write the data. A block index is a logical index in units of 512 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/524288). The logical offset of the data must be 512 KiB aligned.
sourcepub fn set_block_index(self, input: Option<i32>) -> Self
pub fn set_block_index(self, input: Option<i32>) -> Self
The block index of the block in which to write the data. A block index is a logical index in units of 512 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/524288). The logical offset of the data must be 512 KiB aligned.
sourcepub fn block_data(self, input: ByteStream) -> Self
pub fn block_data(self, input: ByteStream) -> Self
The data to write to the block.
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 x-amz-Checksum header. Also, you must specify the checksum algorithm using the x-amz-Checksum-Algorithm 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 Using checksums with the EBS direct APIs in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn set_block_data(self, input: Option<ByteStream>) -> Self
pub fn set_block_data(self, input: Option<ByteStream>) -> Self
The data to write to the block.
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 x-amz-Checksum header. Also, you must specify the checksum algorithm using the x-amz-Checksum-Algorithm 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 Using checksums with the EBS direct APIs in the Amazon Elastic Compute Cloud User Guide.
sourcepub fn data_length(self, input: i32) -> Self
pub fn data_length(self, input: i32) -> Self
The size of the data to write to the block, in bytes. Currently, the only supported size is 524288 bytes.
Valid values: 524288
sourcepub fn set_data_length(self, input: Option<i32>) -> Self
pub fn set_data_length(self, input: Option<i32>) -> Self
The size of the data to write to the block, in bytes. Currently, the only supported size is 524288 bytes.
Valid values: 524288
sourcepub fn set_progress(self, input: Option<i32>) -> Self
pub fn set_progress(self, input: Option<i32>) -> Self
The progress of the write process, as a percentage.
sourcepub fn checksum(self, input: impl Into<String>) -> Self
pub fn checksum(self, input: impl Into<String>) -> Self
A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.
sourcepub fn set_checksum(self, input: Option<String>) -> Self
pub fn set_checksum(self, input: Option<String>) -> Self
A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.
sourcepub fn checksum_algorithm(self, input: ChecksumAlgorithm) -> Self
pub fn checksum_algorithm(self, input: ChecksumAlgorithm) -> Self
The algorithm used to generate the checksum. Currently, the only supported algorithm is SHA256.
sourcepub fn set_checksum_algorithm(self, input: Option<ChecksumAlgorithm>) -> Self
pub fn set_checksum_algorithm(self, input: Option<ChecksumAlgorithm>) -> Self
The algorithm used to generate the checksum. Currently, the only supported algorithm is SHA256.