aws_sdk_ec2/operation/register_image/
_register_image_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for RegisterImage.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RegisterImageInput {
7    /// <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>
8    pub image_location: ::std::option::Option<::std::string::String>,
9    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
10    /// <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>
11    pub billing_products: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    /// <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>
13    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
14    /// </note>
15    /// <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>
16    pub boot_mode: ::std::option::Option<crate::types::BootModeValues>,
17    /// <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>
18    pub tpm_support: ::std::option::Option<crate::types::TpmSupportValues>,
19    /// <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>
20    pub uefi_data: ::std::option::Option<::std::string::String>,
21    /// <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>
22    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
23    /// </note>
24    pub imds_support: ::std::option::Option<crate::types::ImdsSupportValues>,
25    /// <p>The tags to apply to the AMI.</p>
26    /// <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>
27    /// <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>
28    pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
29    /// <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>
30    pub dry_run: ::std::option::Option<bool>,
31    /// <p>A name for your AMI.</p>
32    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
33    pub name: ::std::option::Option<::std::string::String>,
34    /// <p>A description for your AMI.</p>
35    pub description: ::std::option::Option<::std::string::String>,
36    /// <p>The architecture of the AMI.</p>
37    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
38    pub architecture: ::std::option::Option<crate::types::ArchitectureValues>,
39    /// <p>The ID of the kernel.</p>
40    pub kernel_id: ::std::option::Option<::std::string::String>,
41    /// <p>The ID of the RAM disk.</p>
42    pub ramdisk_id: ::std::option::Option<::std::string::String>,
43    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
44    pub root_device_name: ::std::option::Option<::std::string::String>,
45    /// <p>The block device mapping entries.</p>
46    /// <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>
47    /// <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>
48    pub block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
49    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
50    /// <p>Default: <code>paravirtual</code></p>
51    pub virtualization_type: ::std::option::Option<::std::string::String>,
52    /// <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>
53    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
54    /// <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>
55    pub sriov_net_support: ::std::option::Option<::std::string::String>,
56    /// <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>
57    /// <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>
58    pub ena_support: ::std::option::Option<bool>,
59}
60impl RegisterImageInput {
61    /// <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>
62    pub fn image_location(&self) -> ::std::option::Option<&str> {
63        self.image_location.as_deref()
64    }
65    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
66    /// <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>
67    ///
68    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.billing_products.is_none()`.
69    pub fn billing_products(&self) -> &[::std::string::String] {
70        self.billing_products.as_deref().unwrap_or_default()
71    }
72    /// <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>
73    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
74    /// </note>
75    /// <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>
76    pub fn boot_mode(&self) -> ::std::option::Option<&crate::types::BootModeValues> {
77        self.boot_mode.as_ref()
78    }
79    /// <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>
80    pub fn tpm_support(&self) -> ::std::option::Option<&crate::types::TpmSupportValues> {
81        self.tpm_support.as_ref()
82    }
83    /// <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>
84    pub fn uefi_data(&self) -> ::std::option::Option<&str> {
85        self.uefi_data.as_deref()
86    }
87    /// <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>
88    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
89    /// </note>
90    pub fn imds_support(&self) -> ::std::option::Option<&crate::types::ImdsSupportValues> {
91        self.imds_support.as_ref()
92    }
93    /// <p>The tags to apply to the AMI.</p>
94    /// <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>
95    /// <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>
96    ///
97    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_specifications.is_none()`.
98    pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
99        self.tag_specifications.as_deref().unwrap_or_default()
100    }
101    /// <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>
102    pub fn dry_run(&self) -> ::std::option::Option<bool> {
103        self.dry_run
104    }
105    /// <p>A name for your AMI.</p>
106    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
107    pub fn name(&self) -> ::std::option::Option<&str> {
108        self.name.as_deref()
109    }
110    /// <p>A description for your AMI.</p>
111    pub fn description(&self) -> ::std::option::Option<&str> {
112        self.description.as_deref()
113    }
114    /// <p>The architecture of the AMI.</p>
115    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
116    pub fn architecture(&self) -> ::std::option::Option<&crate::types::ArchitectureValues> {
117        self.architecture.as_ref()
118    }
119    /// <p>The ID of the kernel.</p>
120    pub fn kernel_id(&self) -> ::std::option::Option<&str> {
121        self.kernel_id.as_deref()
122    }
123    /// <p>The ID of the RAM disk.</p>
124    pub fn ramdisk_id(&self) -> ::std::option::Option<&str> {
125        self.ramdisk_id.as_deref()
126    }
127    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
128    pub fn root_device_name(&self) -> ::std::option::Option<&str> {
129        self.root_device_name.as_deref()
130    }
131    /// <p>The block device mapping entries.</p>
132    /// <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>
133    /// <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>
134    ///
135    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.block_device_mappings.is_none()`.
136    pub fn block_device_mappings(&self) -> &[crate::types::BlockDeviceMapping] {
137        self.block_device_mappings.as_deref().unwrap_or_default()
138    }
139    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
140    /// <p>Default: <code>paravirtual</code></p>
141    pub fn virtualization_type(&self) -> ::std::option::Option<&str> {
142        self.virtualization_type.as_deref()
143    }
144    /// <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>
145    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
146    /// <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>
147    pub fn sriov_net_support(&self) -> ::std::option::Option<&str> {
148        self.sriov_net_support.as_deref()
149    }
150    /// <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>
151    /// <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>
152    pub fn ena_support(&self) -> ::std::option::Option<bool> {
153        self.ena_support
154    }
155}
156impl RegisterImageInput {
157    /// Creates a new builder-style object to manufacture [`RegisterImageInput`](crate::operation::register_image::RegisterImageInput).
158    pub fn builder() -> crate::operation::register_image::builders::RegisterImageInputBuilder {
159        crate::operation::register_image::builders::RegisterImageInputBuilder::default()
160    }
161}
162
163/// A builder for [`RegisterImageInput`](crate::operation::register_image::RegisterImageInput).
164#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
165#[non_exhaustive]
166pub struct RegisterImageInputBuilder {
167    pub(crate) image_location: ::std::option::Option<::std::string::String>,
168    pub(crate) billing_products: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
169    pub(crate) boot_mode: ::std::option::Option<crate::types::BootModeValues>,
170    pub(crate) tpm_support: ::std::option::Option<crate::types::TpmSupportValues>,
171    pub(crate) uefi_data: ::std::option::Option<::std::string::String>,
172    pub(crate) imds_support: ::std::option::Option<crate::types::ImdsSupportValues>,
173    pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
174    pub(crate) dry_run: ::std::option::Option<bool>,
175    pub(crate) name: ::std::option::Option<::std::string::String>,
176    pub(crate) description: ::std::option::Option<::std::string::String>,
177    pub(crate) architecture: ::std::option::Option<crate::types::ArchitectureValues>,
178    pub(crate) kernel_id: ::std::option::Option<::std::string::String>,
179    pub(crate) ramdisk_id: ::std::option::Option<::std::string::String>,
180    pub(crate) root_device_name: ::std::option::Option<::std::string::String>,
181    pub(crate) block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
182    pub(crate) virtualization_type: ::std::option::Option<::std::string::String>,
183    pub(crate) sriov_net_support: ::std::option::Option<::std::string::String>,
184    pub(crate) ena_support: ::std::option::Option<bool>,
185}
186impl RegisterImageInputBuilder {
187    /// <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>
188    pub fn image_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.image_location = ::std::option::Option::Some(input.into());
190        self
191    }
192    /// <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>
193    pub fn set_image_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.image_location = input;
195        self
196    }
197    /// <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>
198    pub fn get_image_location(&self) -> &::std::option::Option<::std::string::String> {
199        &self.image_location
200    }
201    /// Appends an item to `billing_products`.
202    ///
203    /// To override the contents of this collection use [`set_billing_products`](Self::set_billing_products).
204    ///
205    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
206    /// <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>
207    pub fn billing_products(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        let mut v = self.billing_products.unwrap_or_default();
209        v.push(input.into());
210        self.billing_products = ::std::option::Option::Some(v);
211        self
212    }
213    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
214    /// <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>
215    pub fn set_billing_products(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
216        self.billing_products = input;
217        self
218    }
219    /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
220    /// <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>
221    pub fn get_billing_products(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
222        &self.billing_products
223    }
224    /// <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>
225    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
226    /// </note>
227    /// <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>
228    pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
229        self.boot_mode = ::std::option::Option::Some(input);
230        self
231    }
232    /// <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>
233    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
234    /// </note>
235    /// <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>
236    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
237        self.boot_mode = input;
238        self
239    }
240    /// <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>
241    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
242    /// </note>
243    /// <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>
244    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
245        &self.boot_mode
246    }
247    /// <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>
248    pub fn tpm_support(mut self, input: crate::types::TpmSupportValues) -> Self {
249        self.tpm_support = ::std::option::Option::Some(input);
250        self
251    }
252    /// <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>
253    pub fn set_tpm_support(mut self, input: ::std::option::Option<crate::types::TpmSupportValues>) -> Self {
254        self.tpm_support = input;
255        self
256    }
257    /// <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>
258    pub fn get_tpm_support(&self) -> &::std::option::Option<crate::types::TpmSupportValues> {
259        &self.tpm_support
260    }
261    /// <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>
262    pub fn uefi_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263        self.uefi_data = ::std::option::Option::Some(input.into());
264        self
265    }
266    /// <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>
267    pub fn set_uefi_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.uefi_data = input;
269        self
270    }
271    /// <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>
272    pub fn get_uefi_data(&self) -> &::std::option::Option<::std::string::String> {
273        &self.uefi_data
274    }
275    /// <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>
276    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
277    /// </note>
278    pub fn imds_support(mut self, input: crate::types::ImdsSupportValues) -> Self {
279        self.imds_support = ::std::option::Option::Some(input);
280        self
281    }
282    /// <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>
283    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
284    /// </note>
285    pub fn set_imds_support(mut self, input: ::std::option::Option<crate::types::ImdsSupportValues>) -> Self {
286        self.imds_support = input;
287        self
288    }
289    /// <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>
290    /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
291    /// </note>
292    pub fn get_imds_support(&self) -> &::std::option::Option<crate::types::ImdsSupportValues> {
293        &self.imds_support
294    }
295    /// Appends an item to `tag_specifications`.
296    ///
297    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
298    ///
299    /// <p>The tags to apply to the AMI.</p>
300    /// <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>
301    /// <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>
302    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
303        let mut v = self.tag_specifications.unwrap_or_default();
304        v.push(input);
305        self.tag_specifications = ::std::option::Option::Some(v);
306        self
307    }
308    /// <p>The tags to apply to the AMI.</p>
309    /// <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>
310    /// <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>
311    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
312        self.tag_specifications = input;
313        self
314    }
315    /// <p>The tags to apply to the AMI.</p>
316    /// <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>
317    /// <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>
318    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
319        &self.tag_specifications
320    }
321    /// <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>
322    pub fn dry_run(mut self, input: bool) -> Self {
323        self.dry_run = ::std::option::Option::Some(input);
324        self
325    }
326    /// <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>
327    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
328        self.dry_run = input;
329        self
330    }
331    /// <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>
332    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
333        &self.dry_run
334    }
335    /// <p>A name for your AMI.</p>
336    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
337    /// This field is required.
338    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
339        self.name = ::std::option::Option::Some(input.into());
340        self
341    }
342    /// <p>A name for your AMI.</p>
343    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
344    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345        self.name = input;
346        self
347    }
348    /// <p>A name for your AMI.</p>
349    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
350    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
351        &self.name
352    }
353    /// <p>A description for your AMI.</p>
354    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
355        self.description = ::std::option::Option::Some(input.into());
356        self
357    }
358    /// <p>A description for your AMI.</p>
359    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
360        self.description = input;
361        self
362    }
363    /// <p>A description for your AMI.</p>
364    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
365        &self.description
366    }
367    /// <p>The architecture of the AMI.</p>
368    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
369    pub fn architecture(mut self, input: crate::types::ArchitectureValues) -> Self {
370        self.architecture = ::std::option::Option::Some(input);
371        self
372    }
373    /// <p>The architecture of the AMI.</p>
374    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
375    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::ArchitectureValues>) -> Self {
376        self.architecture = input;
377        self
378    }
379    /// <p>The architecture of the AMI.</p>
380    /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
381    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::ArchitectureValues> {
382        &self.architecture
383    }
384    /// <p>The ID of the kernel.</p>
385    pub fn kernel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
386        self.kernel_id = ::std::option::Option::Some(input.into());
387        self
388    }
389    /// <p>The ID of the kernel.</p>
390    pub fn set_kernel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
391        self.kernel_id = input;
392        self
393    }
394    /// <p>The ID of the kernel.</p>
395    pub fn get_kernel_id(&self) -> &::std::option::Option<::std::string::String> {
396        &self.kernel_id
397    }
398    /// <p>The ID of the RAM disk.</p>
399    pub fn ramdisk_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
400        self.ramdisk_id = ::std::option::Option::Some(input.into());
401        self
402    }
403    /// <p>The ID of the RAM disk.</p>
404    pub fn set_ramdisk_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
405        self.ramdisk_id = input;
406        self
407    }
408    /// <p>The ID of the RAM disk.</p>
409    pub fn get_ramdisk_id(&self) -> &::std::option::Option<::std::string::String> {
410        &self.ramdisk_id
411    }
412    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
413    pub fn root_device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
414        self.root_device_name = ::std::option::Option::Some(input.into());
415        self
416    }
417    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
418    pub fn set_root_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
419        self.root_device_name = input;
420        self
421    }
422    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
423    pub fn get_root_device_name(&self) -> &::std::option::Option<::std::string::String> {
424        &self.root_device_name
425    }
426    /// Appends an item to `block_device_mappings`.
427    ///
428    /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
429    ///
430    /// <p>The block device mapping entries.</p>
431    /// <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>
432    /// <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>
433    pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
434        let mut v = self.block_device_mappings.unwrap_or_default();
435        v.push(input);
436        self.block_device_mappings = ::std::option::Option::Some(v);
437        self
438    }
439    /// <p>The block device mapping entries.</p>
440    /// <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>
441    /// <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>
442    pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
443        self.block_device_mappings = input;
444        self
445    }
446    /// <p>The block device mapping entries.</p>
447    /// <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>
448    /// <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>
449    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
450        &self.block_device_mappings
451    }
452    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
453    /// <p>Default: <code>paravirtual</code></p>
454    pub fn virtualization_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
455        self.virtualization_type = ::std::option::Option::Some(input.into());
456        self
457    }
458    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
459    /// <p>Default: <code>paravirtual</code></p>
460    pub fn set_virtualization_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
461        self.virtualization_type = input;
462        self
463    }
464    /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
465    /// <p>Default: <code>paravirtual</code></p>
466    pub fn get_virtualization_type(&self) -> &::std::option::Option<::std::string::String> {
467        &self.virtualization_type
468    }
469    /// <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>
470    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
471    /// <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>
472    pub fn sriov_net_support(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
473        self.sriov_net_support = ::std::option::Option::Some(input.into());
474        self
475    }
476    /// <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>
477    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
478    /// <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>
479    pub fn set_sriov_net_support(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
480        self.sriov_net_support = input;
481        self
482    }
483    /// <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>
484    /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
485    /// <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>
486    pub fn get_sriov_net_support(&self) -> &::std::option::Option<::std::string::String> {
487        &self.sriov_net_support
488    }
489    /// <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>
490    /// <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>
491    pub fn ena_support(mut self, input: bool) -> Self {
492        self.ena_support = ::std::option::Option::Some(input);
493        self
494    }
495    /// <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>
496    /// <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>
497    pub fn set_ena_support(mut self, input: ::std::option::Option<bool>) -> Self {
498        self.ena_support = input;
499        self
500    }
501    /// <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>
502    /// <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>
503    pub fn get_ena_support(&self) -> &::std::option::Option<bool> {
504        &self.ena_support
505    }
506    /// Consumes the builder and constructs a [`RegisterImageInput`](crate::operation::register_image::RegisterImageInput).
507    pub fn build(
508        self,
509    ) -> ::std::result::Result<crate::operation::register_image::RegisterImageInput, ::aws_smithy_types::error::operation::BuildError> {
510        ::std::result::Result::Ok(crate::operation::register_image::RegisterImageInput {
511            image_location: self.image_location,
512            billing_products: self.billing_products,
513            boot_mode: self.boot_mode,
514            tpm_support: self.tpm_support,
515            uefi_data: self.uefi_data,
516            imds_support: self.imds_support,
517            tag_specifications: self.tag_specifications,
518            dry_run: self.dry_run,
519            name: self.name,
520            description: self.description,
521            architecture: self.architecture,
522            kernel_id: self.kernel_id,
523            ramdisk_id: self.ramdisk_id,
524            root_device_name: self.root_device_name,
525            block_device_mappings: self.block_device_mappings,
526            virtualization_type: self.virtualization_type,
527            sriov_net_support: self.sriov_net_support,
528            ena_support: self.ena_support,
529        })
530    }
531}