aws_sdk_ec2/client/
create_restore_image_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 [`CreateRestoreImageTask`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`bucket(impl Into<String>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::bucket) / [`set_bucket(Option<String>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::set_bucket):<br>required: **true**<br><p>The name of the Amazon S3 bucket that contains the stored AMI object.</p><br>
7    ///   - [`object_key(impl Into<String>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::object_key) / [`set_object_key(Option<String>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::set_object_key):<br>required: **true**<br><p>The name of the stored AMI object in the bucket.</p><br>
8    ///   - [`name(impl Into<String>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::set_name):<br>required: **false**<br><p>The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.</p><br>
9    ///   - [`tag_specifications(TagSpecification)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.</p> <ul>  <li>   <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p></li>  <li>   <p>To tag the snapshots, the value for <code>ResourceType</code> must be <code>snapshot</code>. The same tag is applied to all of the snapshots that are created.</p></li> </ul><br>
10    ///   - [`dry_run(bool)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::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>
11    /// - On success, responds with [`CreateRestoreImageTaskOutput`](crate::operation::create_restore_image_task::CreateRestoreImageTaskOutput) with field(s):
12    ///   - [`image_id(Option<String>)`](crate::operation::create_restore_image_task::CreateRestoreImageTaskOutput::image_id): <p>The AMI ID.</p>
13    /// - On failure, responds with [`SdkError<CreateRestoreImageTaskError>`](crate::operation::create_restore_image_task::CreateRestoreImageTaskError)
14    pub fn create_restore_image_task(&self) -> crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder {
15        crate::operation::create_restore_image_task::builders::CreateRestoreImageTaskFluentBuilder::new(self.handle.clone())
16    }
17}