aws_sdk_ec2/client/create_replace_root_volume_task.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 [`CreateReplaceRootVolumeTask`](crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`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>
7 /// - [`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, or if you want to restore the replacement root volume from an AMI, omit this parameter.</p><br>
8 /// - [`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>
9 /// - [`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>
10 /// - [`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>
11 /// - [`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, or if you want to restore it to its launch state, omit this parameter.</p><br>
12 /// - [`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>
13 /// - [`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>
14 /// - On success, responds with [`CreateReplaceRootVolumeTaskOutput`](crate::operation::create_replace_root_volume_task::CreateReplaceRootVolumeTaskOutput) with field(s):
15 /// - [`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>
16 /// - On failure, responds with [`SdkError<CreateReplaceRootVolumeTaskError>`](crate::operation::create_replace_root_volume_task::CreateReplaceRootVolumeTaskError)
17 pub fn create_replace_root_volume_task(
18 &self,
19 ) -> crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder {
20 crate::operation::create_replace_root_volume_task::builders::CreateReplaceRootVolumeTaskFluentBuilder::new(self.handle.clone())
21 }
22}