aws-sdk-ec2 1.238.0

AWS SDK for Amazon Elastic Compute Cloud
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateReplaceRootVolumeTask`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`instance_id(impl Into<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_instance_id):<br>required: **true**<br><p>The ID of the instance for which to replace the root volume.</p><br>
    ///   - [`snapshot_id(impl Into<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::snapshot_id) / [`set_snapshot_id(Option<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_snapshot_id):<br>required: **false**<br><p>The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a snapshot that you previously created from the original root volume.</p> <p>If you want to restore the replacement root volume to the initial launch state, if you want to restore the replacement root volume from an AMI, or if you want to replace the root volume with a specified volume, omit this parameter.</p><br>
    ///   - [`client_token(impl Into<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_client_token):<br>required: **false**<br><p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p><br>
    ///   - [`dry_run(bool)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
    ///   - [`tag_specifications(TagSpecification)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the root volume replacement task.</p><br>
    ///   - [`image_id(impl Into<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::image_id) / [`set_image_id(Option<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_image_id):<br>required: **false**<br><p>The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing information, architecture type, and virtualization type as that of the instance.</p> <p>If you want to restore the replacement volume from a specific snapshot, if you want to restore it to its launch state, or if you want to replace the root volume with a specified volume, omit this parameter.</p><br>
    ///   - [`delete_replaced_root_volume(bool)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::delete_replaced_root_volume) / [`set_delete_replaced_root_volume(Option<bool>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_delete_replaced_root_volume):<br>required: **false**<br><p>Indicates whether to automatically delete the original root volume after the root volume replacement task completes. To delete the original root volume, specify <code>true</code>. If you choose to keep the original root volume after the replacement task completes, you must manually delete it when you no longer need it.</p><br>
    ///   - [`volume_initialization_rate(i64)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::volume_initialization_rate) / [`set_volume_initialization_rate(Option<i64>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_volume_initialization_rate):<br>required: **false**<br><p>Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the replacement root volume. This is also known as <i>volume initialization</i>. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.</p> <p>Omit this parameter if:</p> <ul>  <li>   <p>You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.</p><note>    <p>If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.</p>   </note></li>  <li>   <p>You want to create a volume that is initialized at the default rate.</p></li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html"> Initialize Amazon EBS volumes</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>Valid range: 100 - 300 MiB/s</p><br>
    ///   - [`volume_id(impl Into<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::volume_id) / [`set_volume_id(Option<String>)`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::set_volume_id):<br>required: **false**<br><p>The ID of the volume to use as the replacement root volume. The specified volume must be in the same Availability Zone as the instance, must be in the <code>available</code> state, and must not be attached to an instance. If the original root volume is encrypted, the specified volume must also be encrypted.</p> <p>If you want to restore the replacement root volume from a specific snapshot, an AMI, or to its launch state, omit this parameter.</p><br>
    /// - On success, responds with [`CreateReplaceRootVolumeTaskOutput`](crate::operation::create_replace_root_volume_task::CreateReplaceRootVolumeTaskOutput) with field(s):
    ///   - [`replace_root_volume_task(Option<ReplaceRootVolumeTask>)`](crate::operation::create_replace_root_volume_task::CreateReplaceRootVolumeTaskOutput::replace_root_volume_task): <p>Information about the root volume replacement task.</p>
    /// - On failure, responds with [`SdkError<CreateReplaceRootVolumeTaskError>`](crate::operation::create_replace_root_volume_task::CreateReplaceRootVolumeTaskError)
    pub fn create_replace_root_volume_task(
        &self,
    ) -> crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder {
        crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::new(self.handle.clone())
    }
}