aws_sdk_ec2/operation/register_image/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::register_image::_register_image_output::RegisterImageOutputBuilder;
3
4pub use crate::operation::register_image::_register_image_input::RegisterImageInputBuilder;
5
6impl crate::operation::register_image::builders::RegisterImageInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::register_image::RegisterImageOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::register_image::RegisterImageError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.register_image();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `RegisterImage`.
24///
25/// <p>Registers an AMI. When you're creating an instance-store backed AMI, registering the AMI is the final step in the creation process. For more information about creating AMIs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot">Create an AMI from a snapshot</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html">Create an instance-store backed AMI</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
26/// <p>For Amazon EBS-backed instances, <code>CreateImage</code> creates and registers the AMI in a single request, so you don't have to register the AMI yourself. We recommend that you always use <code>CreateImage</code> unless you have a specific reason to use RegisterImage.</p>
27/// </note>
28/// <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.</p>
29/// <p><b>Register a snapshot of a root device volume</b></p>
30/// <p>You can use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using a block device mapping. You can't set the encryption state of the volume using the block device mapping. If the snapshot is encrypted, or encryption by default is enabled, the root volume of an instance launched from the AMI is encrypted.</p>
31/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot">Create an AMI from a snapshot</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html">Use encryption with EBS-backed AMIs</a> in the <i>Amazon EC2 User Guide</i>.</p>
32/// <p><b>Amazon Web Services Marketplace product codes</b></p>
33/// <p>If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new AMI.</p>
34/// <p>In most cases, AMIs for Windows, RedHat, SUSE, and SQL Server require correct licensing information to be present on the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>. When creating an AMI from a snapshot, the <code>RegisterImage</code> operation derives the correct billing information from the snapshot's metadata, but this requires the appropriate metadata to be present. To verify if the correct billing information was applied, check the <code>PlatformDetails</code> field on the new AMI. If the field is empty or doesn't match the expected operating system code (for example, Windows, RedHat, SUSE, or SQL), the AMI creation was unsuccessful, and you should discard the AMI and instead create the AMI from an instance using <code>CreateImage</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#how-to-create-ebs-ami">Create an AMI from an instance </a> in the <i>Amazon EC2 User Guide</i>.</p>
35/// <p>If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched from an AMI with a billing product code, make sure that the Reserved Instance has the matching billing product code. If you purchase a Reserved Instance without the matching billing product code, the Reserved Instance will not be applied to the On-Demand Instance. For information about how to obtain the platform details and billing information of an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
36#[derive(::std::clone::Clone, ::std::fmt::Debug)]
37pub struct RegisterImageFluentBuilder {
38    handle: ::std::sync::Arc<crate::client::Handle>,
39    inner: crate::operation::register_image::builders::RegisterImageInputBuilder,
40    config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43    crate::client::customize::internal::CustomizableSend<
44        crate::operation::register_image::RegisterImageOutput,
45        crate::operation::register_image::RegisterImageError,
46    > for RegisterImageFluentBuilder
47{
48    fn send(
49        self,
50        config_override: crate::config::Builder,
51    ) -> crate::client::customize::internal::BoxFuture<
52        crate::client::customize::internal::SendResult<
53            crate::operation::register_image::RegisterImageOutput,
54            crate::operation::register_image::RegisterImageError,
55        >,
56    > {
57        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58    }
59}
60impl RegisterImageFluentBuilder {
61    /// Creates a new `RegisterImageFluentBuilder`.
62    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63        Self {
64            handle,
65            inner: ::std::default::Default::default(),
66            config_override: ::std::option::Option::None,
67        }
68    }
69    /// Access the RegisterImage as a reference.
70    pub fn as_input(&self) -> &crate::operation::register_image::builders::RegisterImageInputBuilder {
71        &self.inner
72    }
73    /// Sends the request and returns the response.
74    ///
75    /// If an error occurs, an `SdkError` will be returned with additional details that
76    /// can be matched against.
77    ///
78    /// By default, any retryable failures will be retried twice. Retry behavior
79    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
80    /// set when configuring the client.
81    pub async fn send(
82        self,
83    ) -> ::std::result::Result<
84        crate::operation::register_image::RegisterImageOutput,
85        ::aws_smithy_runtime_api::client::result::SdkError<
86            crate::operation::register_image::RegisterImageError,
87            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
88        >,
89    > {
90        let input = self
91            .inner
92            .build()
93            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
94        let runtime_plugins = crate::operation::register_image::RegisterImage::operation_runtime_plugins(
95            self.handle.runtime_plugins.clone(),
96            &self.handle.conf,
97            self.config_override,
98        );
99        crate::operation::register_image::RegisterImage::orchestrate(&runtime_plugins, input).await
100    }
101
102    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
103    pub fn customize(
104        self,
105    ) -> crate::client::customize::CustomizableOperation<
106        crate::operation::register_image::RegisterImageOutput,
107        crate::operation::register_image::RegisterImageError,
108        Self,
109    > {
110        crate::client::customize::CustomizableOperation::new(self)
111    }
112    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
113        self.set_config_override(::std::option::Option::Some(config_override.into()));
114        self
115    }
116
117    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
118        self.config_override = config_override;
119        self
120    }
121    /// <p>The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the <code>aws-exec-read</code> canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">Canned ACL</a> in the <i>Amazon S3 Service Developer Guide</i>.</p>
122    pub fn image_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.inner = self.inner.image_location(input.into());
124        self
125    }
126    /// <p>The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the <code>aws-exec-read</code> canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">Canned ACL</a> in the <i>Amazon S3 Service Developer Guide</i>.</p>
127    pub fn set_image_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.inner = self.inner.set_image_location(input);
129        self
130    }
131    /// <p>The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the <code>aws-exec-read</code> canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">Canned ACL</a> in the <i>Amazon S3 Service Developer Guide</i>.</p>
132    pub fn get_image_location(&self) -> &::std::option::Option<::std::string::String> {
133        self.inner.get_image_location()
134    }
135    ///
136    /// Appends an item to `BillingProducts`.
137    ///
138    /// To override the contents of this collection use [`set_billing_products`](Self::set_billing_products).
139    ///
140    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
141    /// <p>If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html">Getting started as an Amazon Web Services Marketplace seller</a> and <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html">AMI-based products in Amazon Web Services Marketplace</a> in the <i>Amazon Web Services Marketplace Seller Guide</i>.</p>
142    pub fn billing_products(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.billing_products(input.into());
144        self
145    }
146    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
147    /// <p>If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html">Getting started as an Amazon Web Services Marketplace seller</a> and <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html">AMI-based products in Amazon Web Services Marketplace</a> in the <i>Amazon Web Services Marketplace Seller Guide</i>.</p>
148    pub fn set_billing_products(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
149        self.inner = self.inner.set_billing_products(input);
150        self
151    }
152    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
153    /// <p>If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html">Getting started as an Amazon Web Services Marketplace seller</a> and <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html">AMI-based products in Amazon Web Services Marketplace</a> in the <i>Amazon Web Services Marketplace Seller Guide</i>.</p>
154    pub fn get_billing_products(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
155        self.inner.get_billing_products()
156    }
157    /// <p>The boot mode of the AMI. A value of <code>uefi-preferred</code> indicates that the AMI supports both UEFI and Legacy BIOS.</p><note>
158    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
159    /// </note>
160    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
161    pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
162        self.inner = self.inner.boot_mode(input);
163        self
164    }
165    /// <p>The boot mode of the AMI. A value of <code>uefi-preferred</code> indicates that the AMI supports both UEFI and Legacy BIOS.</p><note>
166    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
167    /// </note>
168    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
169    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
170        self.inner = self.inner.set_boot_mode(input);
171        self
172    }
173    /// <p>The boot mode of the AMI. A value of <code>uefi-preferred</code> indicates that the AMI supports both UEFI and Legacy BIOS.</p><note>
174    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
175    /// </note>
176    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
177    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
178        self.inner.get_boot_mode()
179    }
180    /// <p>Set to <code>v2.0</code> to enable Trusted Platform Module (TPM) support. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
181    pub fn tpm_support(mut self, input: crate::types::TpmSupportValues) -> Self {
182        self.inner = self.inner.tpm_support(input);
183        self
184    }
185    /// <p>Set to <code>v2.0</code> to enable Trusted Platform Module (TPM) support. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
186    pub fn set_tpm_support(mut self, input: ::std::option::Option<crate::types::TpmSupportValues>) -> Self {
187        self.inner = self.inner.set_tpm_support(input);
188        self
189    }
190    /// <p>Set to <code>v2.0</code> to enable Trusted Platform Module (TPM) support. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
191    pub fn get_tpm_support(&self) -> &::std::option::Option<crate::types::TpmSupportValues> {
192        self.inner.get_tpm_support()
193    }
194    /// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
195    pub fn uefi_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.inner = self.inner.uefi_data(input.into());
197        self
198    }
199    /// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
200    pub fn set_uefi_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.inner = self.inner.set_uefi_data(input);
202        self
203    }
204    /// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
205    pub fn get_uefi_data(&self) -> &::std::option::Option<::std::string::String> {
206        self.inner.get_uefi_data()
207    }
208    /// <p>Set to <code>v2.0</code> to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
209    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
210    /// </note>
211    pub fn imds_support(mut self, input: crate::types::ImdsSupportValues) -> Self {
212        self.inner = self.inner.imds_support(input);
213        self
214    }
215    /// <p>Set to <code>v2.0</code> to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
216    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
217    /// </note>
218    pub fn set_imds_support(mut self, input: ::std::option::Option<crate::types::ImdsSupportValues>) -> Self {
219        self.inner = self.inner.set_imds_support(input);
220        self
221    }
222    /// <p>Set to <code>v2.0</code> to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
223    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
224    /// </note>
225    pub fn get_imds_support(&self) -> &::std::option::Option<crate::types::ImdsSupportValues> {
226        self.inner.get_imds_support()
227    }
228    ///
229    /// Appends an item to `TagSpecifications`.
230    ///
231    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
232    ///
233    /// <p>The tags to apply to the AMI.</p>
234    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>. If you specify another value for <code>ResourceType</code>, the request fails.</p>
235    /// <p>To tag an AMI after it has been registered, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
236    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
237        self.inner = self.inner.tag_specifications(input);
238        self
239    }
240    /// <p>The tags to apply to the AMI.</p>
241    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>. If you specify another value for <code>ResourceType</code>, the request fails.</p>
242    /// <p>To tag an AMI after it has been registered, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
243    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
244        self.inner = self.inner.set_tag_specifications(input);
245        self
246    }
247    /// <p>The tags to apply to the AMI.</p>
248    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>. If you specify another value for <code>ResourceType</code>, the request fails.</p>
249    /// <p>To tag an AMI after it has been registered, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
250    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
251        self.inner.get_tag_specifications()
252    }
253    /// <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>
254    pub fn dry_run(mut self, input: bool) -> Self {
255        self.inner = self.inner.dry_run(input);
256        self
257    }
258    /// <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>
259    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
260        self.inner = self.inner.set_dry_run(input);
261        self
262    }
263    /// <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>
264    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
265        self.inner.get_dry_run()
266    }
267    /// <p>A name for your AMI.</p>
268    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
269    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.inner = self.inner.name(input.into());
271        self
272    }
273    /// <p>A name for your AMI.</p>
274    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
275    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
276        self.inner = self.inner.set_name(input);
277        self
278    }
279    /// <p>A name for your AMI.</p>
280    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
281    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
282        self.inner.get_name()
283    }
284    /// <p>A description for your AMI.</p>
285    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286        self.inner = self.inner.description(input.into());
287        self
288    }
289    /// <p>A description for your AMI.</p>
290    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291        self.inner = self.inner.set_description(input);
292        self
293    }
294    /// <p>A description for your AMI.</p>
295    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
296        self.inner.get_description()
297    }
298    /// <p>The architecture of the AMI.</p>
299    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
300    pub fn architecture(mut self, input: crate::types::ArchitectureValues) -> Self {
301        self.inner = self.inner.architecture(input);
302        self
303    }
304    /// <p>The architecture of the AMI.</p>
305    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
306    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::ArchitectureValues>) -> Self {
307        self.inner = self.inner.set_architecture(input);
308        self
309    }
310    /// <p>The architecture of the AMI.</p>
311    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
312    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::ArchitectureValues> {
313        self.inner.get_architecture()
314    }
315    /// <p>The ID of the kernel.</p>
316    pub fn kernel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317        self.inner = self.inner.kernel_id(input.into());
318        self
319    }
320    /// <p>The ID of the kernel.</p>
321    pub fn set_kernel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.inner = self.inner.set_kernel_id(input);
323        self
324    }
325    /// <p>The ID of the kernel.</p>
326    pub fn get_kernel_id(&self) -> &::std::option::Option<::std::string::String> {
327        self.inner.get_kernel_id()
328    }
329    /// <p>The ID of the RAM disk.</p>
330    pub fn ramdisk_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
331        self.inner = self.inner.ramdisk_id(input.into());
332        self
333    }
334    /// <p>The ID of the RAM disk.</p>
335    pub fn set_ramdisk_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
336        self.inner = self.inner.set_ramdisk_id(input);
337        self
338    }
339    /// <p>The ID of the RAM disk.</p>
340    pub fn get_ramdisk_id(&self) -> &::std::option::Option<::std::string::String> {
341        self.inner.get_ramdisk_id()
342    }
343    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
344    pub fn root_device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
345        self.inner = self.inner.root_device_name(input.into());
346        self
347    }
348    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
349    pub fn set_root_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
350        self.inner = self.inner.set_root_device_name(input);
351        self
352    }
353    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
354    pub fn get_root_device_name(&self) -> &::std::option::Option<::std::string::String> {
355        self.inner.get_root_device_name()
356    }
357    ///
358    /// Appends an item to `BlockDeviceMappings`.
359    ///
360    /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
361    ///
362    /// <p>The block device mapping entries.</p>
363    /// <p>If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.</p>
364    /// <p>If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami">Create AMIs from local snapshots</a> in the <i>Amazon EBS User Guide</i>.</p>
365    pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
366        self.inner = self.inner.block_device_mappings(input);
367        self
368    }
369    /// <p>The block device mapping entries.</p>
370    /// <p>If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.</p>
371    /// <p>If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami">Create AMIs from local snapshots</a> in the <i>Amazon EBS User Guide</i>.</p>
372    pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
373        self.inner = self.inner.set_block_device_mappings(input);
374        self
375    }
376    /// <p>The block device mapping entries.</p>
377    /// <p>If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.</p>
378    /// <p>If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami">Create AMIs from local snapshots</a> in the <i>Amazon EBS User Guide</i>.</p>
379    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
380        self.inner.get_block_device_mappings()
381    }
382    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
383    /// <p>Default: <code>paravirtual</code></p>
384    pub fn virtualization_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385        self.inner = self.inner.virtualization_type(input.into());
386        self
387    }
388    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
389    /// <p>Default: <code>paravirtual</code></p>
390    pub fn set_virtualization_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
391        self.inner = self.inner.set_virtualization_type(input);
392        self
393    }
394    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
395    /// <p>Default: <code>paravirtual</code></p>
396    pub fn get_virtualization_type(&self) -> &::std::option::Option<::std::string::String> {
397        self.inner.get_virtualization_type()
398    }
399    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p>
400    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
401    /// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
402    pub fn sriov_net_support(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
403        self.inner = self.inner.sriov_net_support(input.into());
404        self
405    }
406    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p>
407    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
408    /// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
409    pub fn set_sriov_net_support(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410        self.inner = self.inner.set_sriov_net_support(input);
411        self
412    }
413    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p>
414    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
415    /// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
416    pub fn get_sriov_net_support(&self) -> &::std::option::Option<::std::string::String> {
417        self.inner.get_sriov_net_support()
418    }
419    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p>
420    /// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
421    pub fn ena_support(mut self, input: bool) -> Self {
422        self.inner = self.inner.ena_support(input);
423        self
424    }
425    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p>
426    /// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
427    pub fn set_ena_support(mut self, input: ::std::option::Option<bool>) -> Self {
428        self.inner = self.inner.set_ena_support(input);
429        self
430    }
431    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p>
432    /// <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>
433    pub fn get_ena_support(&self) -> &::std::option::Option<bool> {
434        self.inner.get_ena_support()
435    }
436}