aws_sdk_ec2/client/import_image.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`ImportImage`](crate::operation::import_image::builders::ImportImageFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`architecture(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::architecture) / [`set_architecture(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_architecture):<br>required: **false**<br><p>The architecture of the virtual machine.</p> <p>Valid values: <code>i386</code> | <code>x86_64</code></p><br>
7 /// - [`client_data(ClientData)`](crate::operation::import_image::builders::ImportImageFluentBuilder::client_data) / [`set_client_data(Option<ClientData>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_client_data):<br>required: **false**<br><p>The client-specific data.</p><br>
8 /// - [`client_token(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_client_token):<br>required: **false**<br><p>The token to enable idempotency for VM import requests.</p><br>
9 /// - [`description(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_description):<br>required: **false**<br><p>A description string for the import image task.</p><br>
10 /// - [`disk_containers(ImageDiskContainer)`](crate::operation::import_image::builders::ImportImageFluentBuilder::disk_containers) / [`set_disk_containers(Option<Vec::<ImageDiskContainer>>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_disk_containers):<br>required: **false**<br><p>Information about the disk containers.</p><br>
11 /// - [`dry_run(bool)`](crate::operation::import_image::builders::ImportImageFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
12 /// - [`encrypted(bool)`](crate::operation::import_image::builders::ImportImageFluentBuilder::encrypted) / [`set_encrypted(Option<bool>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_encrypted):<br>required: **false**<br><p>Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p><br>
13 /// - [`hypervisor(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::hypervisor) / [`set_hypervisor(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_hypervisor):<br>required: **false**<br><p>The target hypervisor platform.</p> <p>Valid values: <code>xen</code></p><br>
14 /// - [`kms_key_id(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>An identifier for the symmetric KMS key to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a <code>KmsKeyId</code> is specified, the <code>Encrypted</code> flag must also be set.</p> <p>The KMS key identifier may be provided in any of the following formats:</p> <ul> <li> <p>Key ID</p></li> <li> <p>Key alias</p></li> <li> <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p></li> <li> <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p></li> </ul> <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.</p> <p>The specified KMS key must exist in the Region that the AMI is being copied to.</p> <p>Amazon EBS does not support asymmetric KMS keys.</p><br>
15 /// - [`license_type(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::license_type) / [`set_license_type(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_license_type):<br>required: **false**<br><p>The license type to be used for the Amazon Machine Image (AMI) after importing.</p> <p>Specify <code>AWS</code> to replace the source-system license with an Amazon Web Services license or <code>BYOL</code> to retain the source-system license. Leaving this parameter undefined is the same as choosing <code>AWS</code> when importing a Windows Server operating system, and the same as choosing <code>BYOL</code> when importing a Windows client operating system (such as Windows 10) or a Linux operating system.</p> <p>To use <code>BYOL</code>, you must have existing licenses with rights to use these licenses in a third party cloud, such as Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image">Prerequisites</a> in the VM Import/Export User Guide.</p><br>
16 /// - [`platform(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::platform) / [`set_platform(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_platform):<br>required: **false**<br><p>The operating system of the virtual machine. If you import a VM that is compatible with Unified Extensible Firmware Interface (UEFI) using an EBS snapshot, you must specify a value for the platform.</p> <p>Valid values: <code>Windows</code> | <code>Linux</code></p><br>
17 /// - [`role_name(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::role_name) / [`set_role_name(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_role_name):<br>required: **false**<br><p>The name of the role to use when not using the default role, 'vmimport'.</p><br>
18 /// - [`license_specifications(ImportImageLicenseConfigurationRequest)`](crate::operation::import_image::builders::ImportImageFluentBuilder::license_specifications) / [`set_license_specifications(Option<Vec::<ImportImageLicenseConfigurationRequest>>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_license_specifications):<br>required: **false**<br><p>The ARNs of the license configurations.</p><br>
19 /// - [`tag_specifications(TagSpecification)`](crate::operation::import_image::builders::ImportImageFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the import image task during creation.</p><br>
20 /// - [`usage_operation(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::usage_operation) / [`set_usage_operation(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_usage_operation):<br>required: **false**<br><p>The usage operation value. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#prerequisites">Licensing options</a> in the <i>VM Import/Export User Guide</i>.</p><br>
21 /// - [`boot_mode(BootModeValues)`](crate::operation::import_image::builders::ImportImageFluentBuilder::boot_mode) / [`set_boot_mode(Option<BootModeValues>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_boot_mode):<br>required: **false**<br><p>The boot mode of the virtual machine.</p><note> <p>The <code>uefi-preferred</code> boot mode isn't supported for importing images. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/prerequisites.html#vmimport-boot-modes">Boot modes</a> in the <i>VM Import/Export User Guide</i>.</p> </note><br>
22 /// - On success, responds with [`ImportImageOutput`](crate::operation::import_image::ImportImageOutput) with field(s):
23 /// - [`architecture(Option<String>)`](crate::operation::import_image::ImportImageOutput::architecture): <p>The architecture of the virtual machine.</p>
24 /// - [`description(Option<String>)`](crate::operation::import_image::ImportImageOutput::description): <p>A description of the import task.</p>
25 /// - [`encrypted(Option<bool>)`](crate::operation::import_image::ImportImageOutput::encrypted): <p>Indicates whether the AMI is encrypted.</p>
26 /// - [`hypervisor(Option<String>)`](crate::operation::import_image::ImportImageOutput::hypervisor): <p>The target hypervisor of the import task.</p>
27 /// - [`image_id(Option<String>)`](crate::operation::import_image::ImportImageOutput::image_id): <p>The ID of the Amazon Machine Image (AMI) created by the import task.</p>
28 /// - [`import_task_id(Option<String>)`](crate::operation::import_image::ImportImageOutput::import_task_id): <p>The task ID of the import image task.</p>
29 /// - [`kms_key_id(Option<String>)`](crate::operation::import_image::ImportImageOutput::kms_key_id): <p>The identifier for the symmetric KMS key that was used to create the encrypted AMI.</p>
30 /// - [`license_type(Option<String>)`](crate::operation::import_image::ImportImageOutput::license_type): <p>The license type of the virtual machine.</p>
31 /// - [`platform(Option<String>)`](crate::operation::import_image::ImportImageOutput::platform): <p>The operating system of the virtual machine.</p>
32 /// - [`progress(Option<String>)`](crate::operation::import_image::ImportImageOutput::progress): <p>The progress of the task.</p>
33 /// - [`snapshot_details(Option<Vec::<SnapshotDetail>>)`](crate::operation::import_image::ImportImageOutput::snapshot_details): <p>Information about the snapshots.</p>
34 /// - [`status(Option<String>)`](crate::operation::import_image::ImportImageOutput::status): <p>A brief status of the task.</p>
35 /// - [`status_message(Option<String>)`](crate::operation::import_image::ImportImageOutput::status_message): <p>A detailed status message of the import task.</p>
36 /// - [`license_specifications(Option<Vec::<ImportImageLicenseConfigurationResponse>>)`](crate::operation::import_image::ImportImageOutput::license_specifications): <p>The ARNs of the license configurations.</p>
37 /// - [`tags(Option<Vec::<Tag>>)`](crate::operation::import_image::ImportImageOutput::tags): <p>Any tags assigned to the import image task.</p>
38 /// - [`usage_operation(Option<String>)`](crate::operation::import_image::ImportImageOutput::usage_operation): <p>The usage operation value.</p>
39 /// - On failure, responds with [`SdkError<ImportImageError>`](crate::operation::import_image::ImportImageError)
40 pub fn import_image(&self) -> crate::operation::import_image::builders::ImportImageFluentBuilder {
41 crate::operation::import_image::builders::ImportImageFluentBuilder::new(self.handle.clone())
42 }
43}