aws_sdk_ec2/operation/create_image/
_create_image_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateImageInput {
6    /// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.</p>
7    /// <ul>
8    /// <li>
9    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p></li>
10    /// <li>
11    /// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for <code>ResourceType</code> must be <code>snapshot</code>. The same tag is applied to all of the snapshots that are created.</p></li>
12    /// </ul>
13    /// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
14    /// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
15    pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
16    /// <note>
17    /// <p>Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.</p>
18    /// </note>
19    /// <p>The Amazon S3 location where the snapshots will be stored.</p>
20    /// <ul>
21    /// <li>
22    /// <p>To create local snapshots in the same Local Zone as the source instance, specify <code>local</code>.</p></li>
23    /// <li>
24    /// <p>To create regional snapshots in the parent Region of the Local Zone, specify <code>regional</code> or omit this parameter.</p></li>
25    /// </ul>
26    /// <p>Default: <code>regional</code></p>
27    pub snapshot_location: ::std::option::Option<crate::types::SnapshotLocationEnum>,
28    /// <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>
29    pub dry_run: ::std::option::Option<bool>,
30    /// <p>The ID of the instance.</p>
31    pub instance_id: ::std::option::Option<::std::string::String>,
32    /// <p>A name for the new image.</p>
33    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
34    pub name: ::std::option::Option<::std::string::String>,
35    /// <p>A description for the new image.</p>
36    pub description: ::std::option::Option<::std::string::String>,
37    /// <p>Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:</p>
38    /// <ul>
39    /// <li>
40    /// <p><code>true</code> - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.</p></li>
41    /// <li>
42    /// <p><code>false</code> - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before the snapshots are created.</p></li>
43    /// </ul>
44    /// <p>Default: <code>false</code></p>
45    pub no_reboot: ::std::option::Option<bool>,
46    /// <p>The block device mappings.</p>
47    /// <p>When using the CreateImage action:</p>
48    /// <ul>
49    /// <li>
50    /// <p>You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.</p></li>
51    /// <li>
52    /// <p>You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead.</p></li>
53    /// <li>
54    /// <p>The only option that can be changed for existing mappings or snapshots is <code>DeleteOnTermination</code>.</p></li>
55    /// </ul>
56    pub block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
57}
58impl CreateImageInput {
59    /// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.</p>
60    /// <ul>
61    /// <li>
62    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p></li>
63    /// <li>
64    /// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for <code>ResourceType</code> must be <code>snapshot</code>. The same tag is applied to all of the snapshots that are created.</p></li>
65    /// </ul>
66    /// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
67    /// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
68    ///
69    /// 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()`.
70    pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
71        self.tag_specifications.as_deref().unwrap_or_default()
72    }
73    /// <note>
74    /// <p>Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.</p>
75    /// </note>
76    /// <p>The Amazon S3 location where the snapshots will be stored.</p>
77    /// <ul>
78    /// <li>
79    /// <p>To create local snapshots in the same Local Zone as the source instance, specify <code>local</code>.</p></li>
80    /// <li>
81    /// <p>To create regional snapshots in the parent Region of the Local Zone, specify <code>regional</code> or omit this parameter.</p></li>
82    /// </ul>
83    /// <p>Default: <code>regional</code></p>
84    pub fn snapshot_location(&self) -> ::std::option::Option<&crate::types::SnapshotLocationEnum> {
85        self.snapshot_location.as_ref()
86    }
87    /// <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>
88    pub fn dry_run(&self) -> ::std::option::Option<bool> {
89        self.dry_run
90    }
91    /// <p>The ID of the instance.</p>
92    pub fn instance_id(&self) -> ::std::option::Option<&str> {
93        self.instance_id.as_deref()
94    }
95    /// <p>A name for the new image.</p>
96    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
97    pub fn name(&self) -> ::std::option::Option<&str> {
98        self.name.as_deref()
99    }
100    /// <p>A description for the new image.</p>
101    pub fn description(&self) -> ::std::option::Option<&str> {
102        self.description.as_deref()
103    }
104    /// <p>Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:</p>
105    /// <ul>
106    /// <li>
107    /// <p><code>true</code> - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.</p></li>
108    /// <li>
109    /// <p><code>false</code> - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before the snapshots are created.</p></li>
110    /// </ul>
111    /// <p>Default: <code>false</code></p>
112    pub fn no_reboot(&self) -> ::std::option::Option<bool> {
113        self.no_reboot
114    }
115    /// <p>The block device mappings.</p>
116    /// <p>When using the CreateImage action:</p>
117    /// <ul>
118    /// <li>
119    /// <p>You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.</p></li>
120    /// <li>
121    /// <p>You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead.</p></li>
122    /// <li>
123    /// <p>The only option that can be changed for existing mappings or snapshots is <code>DeleteOnTermination</code>.</p></li>
124    /// </ul>
125    ///
126    /// 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()`.
127    pub fn block_device_mappings(&self) -> &[crate::types::BlockDeviceMapping] {
128        self.block_device_mappings.as_deref().unwrap_or_default()
129    }
130}
131impl CreateImageInput {
132    /// Creates a new builder-style object to manufacture [`CreateImageInput`](crate::operation::create_image::CreateImageInput).
133    pub fn builder() -> crate::operation::create_image::builders::CreateImageInputBuilder {
134        crate::operation::create_image::builders::CreateImageInputBuilder::default()
135    }
136}
137
138/// A builder for [`CreateImageInput`](crate::operation::create_image::CreateImageInput).
139#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
140#[non_exhaustive]
141pub struct CreateImageInputBuilder {
142    pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
143    pub(crate) snapshot_location: ::std::option::Option<crate::types::SnapshotLocationEnum>,
144    pub(crate) dry_run: ::std::option::Option<bool>,
145    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
146    pub(crate) name: ::std::option::Option<::std::string::String>,
147    pub(crate) description: ::std::option::Option<::std::string::String>,
148    pub(crate) no_reboot: ::std::option::Option<bool>,
149    pub(crate) block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
150}
151impl CreateImageInputBuilder {
152    /// Appends an item to `tag_specifications`.
153    ///
154    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
155    ///
156    /// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.</p>
157    /// <ul>
158    /// <li>
159    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p></li>
160    /// <li>
161    /// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for <code>ResourceType</code> must be <code>snapshot</code>. The same tag is applied to all of the snapshots that are created.</p></li>
162    /// </ul>
163    /// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
164    /// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
165    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
166        let mut v = self.tag_specifications.unwrap_or_default();
167        v.push(input);
168        self.tag_specifications = ::std::option::Option::Some(v);
169        self
170    }
171    /// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.</p>
172    /// <ul>
173    /// <li>
174    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p></li>
175    /// <li>
176    /// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for <code>ResourceType</code> must be <code>snapshot</code>. The same tag is applied to all of the snapshots that are created.</p></li>
177    /// </ul>
178    /// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
179    /// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
180    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
181        self.tag_specifications = input;
182        self
183    }
184    /// <p>The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.</p>
185    /// <ul>
186    /// <li>
187    /// <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>.</p></li>
188    /// <li>
189    /// <p>To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for <code>ResourceType</code> must be <code>snapshot</code>. The same tag is applied to all of the snapshots that are created.</p></li>
190    /// </ul>
191    /// <p>If you specify other values for <code>ResourceType</code>, the request fails.</p>
192    /// <p>To tag an AMI or snapshot after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
193    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
194        &self.tag_specifications
195    }
196    /// <note>
197    /// <p>Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.</p>
198    /// </note>
199    /// <p>The Amazon S3 location where the snapshots will be stored.</p>
200    /// <ul>
201    /// <li>
202    /// <p>To create local snapshots in the same Local Zone as the source instance, specify <code>local</code>.</p></li>
203    /// <li>
204    /// <p>To create regional snapshots in the parent Region of the Local Zone, specify <code>regional</code> or omit this parameter.</p></li>
205    /// </ul>
206    /// <p>Default: <code>regional</code></p>
207    pub fn snapshot_location(mut self, input: crate::types::SnapshotLocationEnum) -> Self {
208        self.snapshot_location = ::std::option::Option::Some(input);
209        self
210    }
211    /// <note>
212    /// <p>Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.</p>
213    /// </note>
214    /// <p>The Amazon S3 location where the snapshots will be stored.</p>
215    /// <ul>
216    /// <li>
217    /// <p>To create local snapshots in the same Local Zone as the source instance, specify <code>local</code>.</p></li>
218    /// <li>
219    /// <p>To create regional snapshots in the parent Region of the Local Zone, specify <code>regional</code> or omit this parameter.</p></li>
220    /// </ul>
221    /// <p>Default: <code>regional</code></p>
222    pub fn set_snapshot_location(mut self, input: ::std::option::Option<crate::types::SnapshotLocationEnum>) -> Self {
223        self.snapshot_location = input;
224        self
225    }
226    /// <note>
227    /// <p>Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.</p>
228    /// </note>
229    /// <p>The Amazon S3 location where the snapshots will be stored.</p>
230    /// <ul>
231    /// <li>
232    /// <p>To create local snapshots in the same Local Zone as the source instance, specify <code>local</code>.</p></li>
233    /// <li>
234    /// <p>To create regional snapshots in the parent Region of the Local Zone, specify <code>regional</code> or omit this parameter.</p></li>
235    /// </ul>
236    /// <p>Default: <code>regional</code></p>
237    pub fn get_snapshot_location(&self) -> &::std::option::Option<crate::types::SnapshotLocationEnum> {
238        &self.snapshot_location
239    }
240    /// <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>
241    pub fn dry_run(mut self, input: bool) -> Self {
242        self.dry_run = ::std::option::Option::Some(input);
243        self
244    }
245    /// <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>
246    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
247        self.dry_run = input;
248        self
249    }
250    /// <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>
251    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
252        &self.dry_run
253    }
254    /// <p>The ID of the instance.</p>
255    /// This field is required.
256    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
257        self.instance_id = ::std::option::Option::Some(input.into());
258        self
259    }
260    /// <p>The ID of the instance.</p>
261    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
262        self.instance_id = input;
263        self
264    }
265    /// <p>The ID of the instance.</p>
266    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
267        &self.instance_id
268    }
269    /// <p>A name for the new image.</p>
270    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
271    /// This field is required.
272    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273        self.name = ::std::option::Option::Some(input.into());
274        self
275    }
276    /// <p>A name for the new image.</p>
277    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
278    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
279        self.name = input;
280        self
281    }
282    /// <p>A name for the new image.</p>
283    /// <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
284    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
285        &self.name
286    }
287    /// <p>A description for the new image.</p>
288    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289        self.description = ::std::option::Option::Some(input.into());
290        self
291    }
292    /// <p>A description for the new image.</p>
293    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294        self.description = input;
295        self
296    }
297    /// <p>A description for the new image.</p>
298    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
299        &self.description
300    }
301    /// <p>Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:</p>
302    /// <ul>
303    /// <li>
304    /// <p><code>true</code> - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.</p></li>
305    /// <li>
306    /// <p><code>false</code> - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before the snapshots are created.</p></li>
307    /// </ul>
308    /// <p>Default: <code>false</code></p>
309    pub fn no_reboot(mut self, input: bool) -> Self {
310        self.no_reboot = ::std::option::Option::Some(input);
311        self
312    }
313    /// <p>Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:</p>
314    /// <ul>
315    /// <li>
316    /// <p><code>true</code> - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.</p></li>
317    /// <li>
318    /// <p><code>false</code> - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before the snapshots are created.</p></li>
319    /// </ul>
320    /// <p>Default: <code>false</code></p>
321    pub fn set_no_reboot(mut self, input: ::std::option::Option<bool>) -> Self {
322        self.no_reboot = input;
323        self
324    }
325    /// <p>Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:</p>
326    /// <ul>
327    /// <li>
328    /// <p><code>true</code> - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.</p></li>
329    /// <li>
330    /// <p><code>false</code> - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before the snapshots are created.</p></li>
331    /// </ul>
332    /// <p>Default: <code>false</code></p>
333    pub fn get_no_reboot(&self) -> &::std::option::Option<bool> {
334        &self.no_reboot
335    }
336    /// Appends an item to `block_device_mappings`.
337    ///
338    /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
339    ///
340    /// <p>The block device mappings.</p>
341    /// <p>When using the CreateImage action:</p>
342    /// <ul>
343    /// <li>
344    /// <p>You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.</p></li>
345    /// <li>
346    /// <p>You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead.</p></li>
347    /// <li>
348    /// <p>The only option that can be changed for existing mappings or snapshots is <code>DeleteOnTermination</code>.</p></li>
349    /// </ul>
350    pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
351        let mut v = self.block_device_mappings.unwrap_or_default();
352        v.push(input);
353        self.block_device_mappings = ::std::option::Option::Some(v);
354        self
355    }
356    /// <p>The block device mappings.</p>
357    /// <p>When using the CreateImage action:</p>
358    /// <ul>
359    /// <li>
360    /// <p>You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.</p></li>
361    /// <li>
362    /// <p>You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead.</p></li>
363    /// <li>
364    /// <p>The only option that can be changed for existing mappings or snapshots is <code>DeleteOnTermination</code>.</p></li>
365    /// </ul>
366    pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
367        self.block_device_mappings = input;
368        self
369    }
370    /// <p>The block device mappings.</p>
371    /// <p>When using the CreateImage action:</p>
372    /// <ul>
373    /// <li>
374    /// <p>You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.</p></li>
375    /// <li>
376    /// <p>You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead.</p></li>
377    /// <li>
378    /// <p>The only option that can be changed for existing mappings or snapshots is <code>DeleteOnTermination</code>.</p></li>
379    /// </ul>
380    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
381        &self.block_device_mappings
382    }
383    /// Consumes the builder and constructs a [`CreateImageInput`](crate::operation::create_image::CreateImageInput).
384    pub fn build(self) -> ::std::result::Result<crate::operation::create_image::CreateImageInput, ::aws_smithy_types::error::operation::BuildError> {
385        ::std::result::Result::Ok(crate::operation::create_image::CreateImageInput {
386            tag_specifications: self.tag_specifications,
387            snapshot_location: self.snapshot_location,
388            dry_run: self.dry_run,
389            instance_id: self.instance_id,
390            name: self.name,
391            description: self.description,
392            no_reboot: self.no_reboot,
393            block_device_mappings: self.block_device_mappings,
394        })
395    }
396}