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>
26/// <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>
27/// <p><b>Register a snapshot of a root device volume</b></p>
28/// <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>
29/// <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>
30/// <p><b>Amazon Web Services Marketplace product codes</b></p>
31/// <p>If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new AMI.</p>
32/// <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. 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>
33/// <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 is not 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>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct RegisterImageFluentBuilder {
36 handle: ::std::sync::Arc<crate::client::Handle>,
37 inner: crate::operation::register_image::builders::RegisterImageInputBuilder,
38 config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41 crate::client::customize::internal::CustomizableSend<
42 crate::operation::register_image::RegisterImageOutput,
43 crate::operation::register_image::RegisterImageError,
44 > for RegisterImageFluentBuilder
45{
46 fn send(
47 self,
48 config_override: crate::config::Builder,
49 ) -> crate::client::customize::internal::BoxFuture<
50 crate::client::customize::internal::SendResult<
51 crate::operation::register_image::RegisterImageOutput,
52 crate::operation::register_image::RegisterImageError,
53 >,
54 > {
55 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56 }
57}
58impl RegisterImageFluentBuilder {
59 /// Creates a new `RegisterImageFluentBuilder`.
60 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61 Self {
62 handle,
63 inner: ::std::default::Default::default(),
64 config_override: ::std::option::Option::None,
65 }
66 }
67 /// Access the RegisterImage as a reference.
68 pub fn as_input(&self) -> &crate::operation::register_image::builders::RegisterImageInputBuilder {
69 &self.inner
70 }
71 /// Sends the request and returns the response.
72 ///
73 /// If an error occurs, an `SdkError` will be returned with additional details that
74 /// can be matched against.
75 ///
76 /// By default, any retryable failures will be retried twice. Retry behavior
77 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78 /// set when configuring the client.
79 pub async fn send(
80 self,
81 ) -> ::std::result::Result<
82 crate::operation::register_image::RegisterImageOutput,
83 ::aws_smithy_runtime_api::client::result::SdkError<
84 crate::operation::register_image::RegisterImageError,
85 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86 >,
87 > {
88 let input = self
89 .inner
90 .build()
91 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92 let runtime_plugins = crate::operation::register_image::RegisterImage::operation_runtime_plugins(
93 self.handle.runtime_plugins.clone(),
94 &self.handle.conf,
95 self.config_override,
96 );
97 crate::operation::register_image::RegisterImage::orchestrate(&runtime_plugins, input).await
98 }
99
100 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101 pub fn customize(
102 self,
103 ) -> crate::client::customize::CustomizableOperation<
104 crate::operation::register_image::RegisterImageOutput,
105 crate::operation::register_image::RegisterImageError,
106 Self,
107 > {
108 crate::client::customize::CustomizableOperation::new(self)
109 }
110 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111 self.set_config_override(::std::option::Option::Some(config_override.into()));
112 self
113 }
114
115 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116 self.config_override = config_override;
117 self
118 }
119 /// <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>
120 pub fn image_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.inner = self.inner.image_location(input.into());
122 self
123 }
124 /// <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>
125 pub fn set_image_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.inner = self.inner.set_image_location(input);
127 self
128 }
129 /// <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>
130 pub fn get_image_location(&self) -> &::std::option::Option<::std::string::String> {
131 self.inner.get_image_location()
132 }
133 ///
134 /// Appends an item to `BillingProducts`.
135 ///
136 /// To override the contents of this collection use [`set_billing_products`](Self::set_billing_products).
137 ///
138 /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
139 /// <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>
140 pub fn billing_products(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.inner = self.inner.billing_products(input.into());
142 self
143 }
144 /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
145 /// <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>
146 pub fn set_billing_products(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
147 self.inner = self.inner.set_billing_products(input);
148 self
149 }
150 /// <p>The billing product codes. Your account must be authorized to specify billing product codes.</p>
151 /// <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>
152 pub fn get_billing_products(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
153 self.inner.get_billing_products()
154 }
155 /// <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>
156 /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
157 /// </note>
158 /// <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>
159 pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
160 self.inner = self.inner.boot_mode(input);
161 self
162 }
163 /// <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>
164 /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
165 /// </note>
166 /// <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>
167 pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
168 self.inner = self.inner.set_boot_mode(input);
169 self
170 }
171 /// <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>
172 /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
173 /// </note>
174 /// <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>
175 pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
176 self.inner.get_boot_mode()
177 }
178 /// <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>
179 pub fn tpm_support(mut self, input: crate::types::TpmSupportValues) -> Self {
180 self.inner = self.inner.tpm_support(input);
181 self
182 }
183 /// <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>
184 pub fn set_tpm_support(mut self, input: ::std::option::Option<crate::types::TpmSupportValues>) -> Self {
185 self.inner = self.inner.set_tpm_support(input);
186 self
187 }
188 /// <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>
189 pub fn get_tpm_support(&self) -> &::std::option::Option<crate::types::TpmSupportValues> {
190 self.inner.get_tpm_support()
191 }
192 /// <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>
193 pub fn uefi_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194 self.inner = self.inner.uefi_data(input.into());
195 self
196 }
197 /// <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>
198 pub fn set_uefi_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199 self.inner = self.inner.set_uefi_data(input);
200 self
201 }
202 /// <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>
203 pub fn get_uefi_data(&self) -> &::std::option::Option<::std::string::String> {
204 self.inner.get_uefi_data()
205 }
206 /// <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>
207 /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
208 /// </note>
209 pub fn imds_support(mut self, input: crate::types::ImdsSupportValues) -> Self {
210 self.inner = self.inner.imds_support(input);
211 self
212 }
213 /// <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>
214 /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
215 /// </note>
216 pub fn set_imds_support(mut self, input: ::std::option::Option<crate::types::ImdsSupportValues>) -> Self {
217 self.inner = self.inner.set_imds_support(input);
218 self
219 }
220 /// <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>
221 /// <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p>
222 /// </note>
223 pub fn get_imds_support(&self) -> &::std::option::Option<crate::types::ImdsSupportValues> {
224 self.inner.get_imds_support()
225 }
226 ///
227 /// Appends an item to `TagSpecifications`.
228 ///
229 /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
230 ///
231 /// <p>The tags to apply to the AMI.</p>
232 /// <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>
233 /// <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>
234 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
235 self.inner = self.inner.tag_specifications(input);
236 self
237 }
238 /// <p>The tags to apply to the AMI.</p>
239 /// <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>
240 /// <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>
241 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
242 self.inner = self.inner.set_tag_specifications(input);
243 self
244 }
245 /// <p>The tags to apply to the AMI.</p>
246 /// <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>
247 /// <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>
248 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
249 self.inner.get_tag_specifications()
250 }
251 /// <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>
252 pub fn dry_run(mut self, input: bool) -> Self {
253 self.inner = self.inner.dry_run(input);
254 self
255 }
256 /// <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>
257 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
258 self.inner = self.inner.set_dry_run(input);
259 self
260 }
261 /// <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>
262 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
263 self.inner.get_dry_run()
264 }
265 /// <p>A name for your AMI.</p>
266 /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
267 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.inner = self.inner.name(input.into());
269 self
270 }
271 /// <p>A name for your AMI.</p>
272 /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
273 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274 self.inner = self.inner.set_name(input);
275 self
276 }
277 /// <p>A name for your AMI.</p>
278 /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
279 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
280 self.inner.get_name()
281 }
282 /// <p>A description for your AMI.</p>
283 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284 self.inner = self.inner.description(input.into());
285 self
286 }
287 /// <p>A description for your AMI.</p>
288 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289 self.inner = self.inner.set_description(input);
290 self
291 }
292 /// <p>A description for your AMI.</p>
293 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
294 self.inner.get_description()
295 }
296 /// <p>The architecture of the AMI.</p>
297 /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
298 pub fn architecture(mut self, input: crate::types::ArchitectureValues) -> Self {
299 self.inner = self.inner.architecture(input);
300 self
301 }
302 /// <p>The architecture of the AMI.</p>
303 /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
304 pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::ArchitectureValues>) -> Self {
305 self.inner = self.inner.set_architecture(input);
306 self
307 }
308 /// <p>The architecture of the AMI.</p>
309 /// <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>
310 pub fn get_architecture(&self) -> &::std::option::Option<crate::types::ArchitectureValues> {
311 self.inner.get_architecture()
312 }
313 /// <p>The ID of the kernel.</p>
314 pub fn kernel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315 self.inner = self.inner.kernel_id(input.into());
316 self
317 }
318 /// <p>The ID of the kernel.</p>
319 pub fn set_kernel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320 self.inner = self.inner.set_kernel_id(input);
321 self
322 }
323 /// <p>The ID of the kernel.</p>
324 pub fn get_kernel_id(&self) -> &::std::option::Option<::std::string::String> {
325 self.inner.get_kernel_id()
326 }
327 /// <p>The ID of the RAM disk.</p>
328 pub fn ramdisk_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
329 self.inner = self.inner.ramdisk_id(input.into());
330 self
331 }
332 /// <p>The ID of the RAM disk.</p>
333 pub fn set_ramdisk_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
334 self.inner = self.inner.set_ramdisk_id(input);
335 self
336 }
337 /// <p>The ID of the RAM disk.</p>
338 pub fn get_ramdisk_id(&self) -> &::std::option::Option<::std::string::String> {
339 self.inner.get_ramdisk_id()
340 }
341 /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
342 pub fn root_device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
343 self.inner = self.inner.root_device_name(input.into());
344 self
345 }
346 /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
347 pub fn set_root_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
348 self.inner = self.inner.set_root_device_name(input);
349 self
350 }
351 /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
352 pub fn get_root_device_name(&self) -> &::std::option::Option<::std::string::String> {
353 self.inner.get_root_device_name()
354 }
355 ///
356 /// Appends an item to `BlockDeviceMappings`.
357 ///
358 /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
359 ///
360 /// <p>The block device mapping entries.</p>
361 /// <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>
362 /// <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>
363 pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
364 self.inner = self.inner.block_device_mappings(input);
365 self
366 }
367 /// <p>The block device mapping entries.</p>
368 /// <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>
369 /// <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>
370 pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
371 self.inner = self.inner.set_block_device_mappings(input);
372 self
373 }
374 /// <p>The block device mapping entries.</p>
375 /// <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>
376 /// <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>
377 pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
378 self.inner.get_block_device_mappings()
379 }
380 /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
381 /// <p>Default: <code>paravirtual</code></p>
382 pub fn virtualization_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383 self.inner = self.inner.virtualization_type(input.into());
384 self
385 }
386 /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
387 /// <p>Default: <code>paravirtual</code></p>
388 pub fn set_virtualization_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
389 self.inner = self.inner.set_virtualization_type(input);
390 self
391 }
392 /// <p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p>
393 /// <p>Default: <code>paravirtual</code></p>
394 pub fn get_virtualization_type(&self) -> &::std::option::Option<::std::string::String> {
395 self.inner.get_virtualization_type()
396 }
397 /// <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>
398 /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
399 /// <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>
400 pub fn sriov_net_support(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
401 self.inner = self.inner.sriov_net_support(input.into());
402 self
403 }
404 /// <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>
405 /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
406 /// <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>
407 pub fn set_sriov_net_support(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
408 self.inner = self.inner.set_sriov_net_support(input);
409 self
410 }
411 /// <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>
412 /// <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p>
413 /// <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>
414 pub fn get_sriov_net_support(&self) -> &::std::option::Option<::std::string::String> {
415 self.inner.get_sriov_net_support()
416 }
417 /// <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>
418 /// <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>
419 pub fn ena_support(mut self, input: bool) -> Self {
420 self.inner = self.inner.ena_support(input);
421 self
422 }
423 /// <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>
424 /// <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>
425 pub fn set_ena_support(mut self, input: ::std::option::Option<bool>) -> Self {
426 self.inner = self.inner.set_ena_support(input);
427 self
428 }
429 /// <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>
430 /// <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>
431 pub fn get_ena_support(&self) -> &::std::option::Option<bool> {
432 self.inner.get_ena_support()
433 }
434}