1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`ImportImage`](crate::operation::import_image::builders::ImportImageFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`architecture(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::architecture) / [`set_architecture(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_architecture): <p>The architecture of the virtual machine.</p>  <p>Valid values: <code>i386</code> | <code>x86_64</code> </p>
    ///   - [`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): <p>The client-specific data.</p>
    ///   - [`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): <p>The token to enable idempotency for VM import requests.</p>
    ///   - [`description(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_description): <p>A description string for the import image task.</p>
    ///   - [`disk_containers(Vec<ImageDiskContainer>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::disk_containers) / [`set_disk_containers(Option<Vec<ImageDiskContainer>>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_disk_containers): <p>Information about the disk containers.</p>
    ///   - [`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): <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>
    ///   - [`encrypted(bool)`](crate::operation::import_image::builders::ImportImageFluentBuilder::encrypted) / [`set_encrypted(Option<bool>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_encrypted): <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>
    ///   - [`hypervisor(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::hypervisor) / [`set_hypervisor(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_hypervisor): <p>The target hypervisor platform.</p>  <p>Valid values: <code>xen</code> </p>
    ///   - [`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): <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. 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>   <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>
    ///   - [`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): <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>
    ///   - [`platform(impl Into<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::platform) / [`set_platform(Option<String>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_platform): <p>The operating system of the virtual machine.</p>  <p>Valid values: <code>Windows</code> | <code>Linux</code> </p>
    ///   - [`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): <p>The name of the role to use when not using the default role, 'vmimport'.</p>
    ///   - [`license_specifications(Vec<ImportImageLicenseConfigurationRequest>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::license_specifications) / [`set_license_specifications(Option<Vec<ImportImageLicenseConfigurationRequest>>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_license_specifications): <p>The ARNs of the license configurations.</p>
    ///   - [`tag_specifications(Vec<TagSpecification>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec<TagSpecification>>)`](crate::operation::import_image::builders::ImportImageFluentBuilder::set_tag_specifications): <p>The tags to apply to the import image task during creation.</p>
    ///   - [`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): <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>
    ///   - [`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): <p>The boot mode of the virtual machine.</p>
    /// - On success, responds with [`ImportImageOutput`](crate::operation::import_image::ImportImageOutput) with field(s):
    ///   - [`architecture(Option<String>)`](crate::operation::import_image::ImportImageOutput::architecture): <p>The architecture of the virtual machine.</p>
    ///   - [`description(Option<String>)`](crate::operation::import_image::ImportImageOutput::description): <p>A description of the import task.</p>
    ///   - [`encrypted(Option<bool>)`](crate::operation::import_image::ImportImageOutput::encrypted): <p>Indicates whether the AMI is encrypted.</p>
    ///   - [`hypervisor(Option<String>)`](crate::operation::import_image::ImportImageOutput::hypervisor): <p>The target hypervisor of the import task.</p>
    ///   - [`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>
    ///   - [`import_task_id(Option<String>)`](crate::operation::import_image::ImportImageOutput::import_task_id): <p>The task ID of the import image task.</p>
    ///   - [`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>
    ///   - [`license_type(Option<String>)`](crate::operation::import_image::ImportImageOutput::license_type): <p>The license type of the virtual machine.</p>
    ///   - [`platform(Option<String>)`](crate::operation::import_image::ImportImageOutput::platform): <p>The operating system of the virtual machine.</p>
    ///   - [`progress(Option<String>)`](crate::operation::import_image::ImportImageOutput::progress): <p>The progress of the task.</p>
    ///   - [`snapshot_details(Option<Vec<SnapshotDetail>>)`](crate::operation::import_image::ImportImageOutput::snapshot_details): <p>Information about the snapshots.</p>
    ///   - [`status(Option<String>)`](crate::operation::import_image::ImportImageOutput::status): <p>A brief status of the task.</p>
    ///   - [`status_message(Option<String>)`](crate::operation::import_image::ImportImageOutput::status_message): <p>A detailed status message of the import task.</p>
    ///   - [`license_specifications(Option<Vec<ImportImageLicenseConfigurationResponse>>)`](crate::operation::import_image::ImportImageOutput::license_specifications): <p>The ARNs of the license configurations.</p>
    ///   - [`tags(Option<Vec<Tag>>)`](crate::operation::import_image::ImportImageOutput::tags): <p>Any tags assigned to the import image task.</p>
    ///   - [`usage_operation(Option<String>)`](crate::operation::import_image::ImportImageOutput::usage_operation): <p>The usage operation value.</p>
    /// - On failure, responds with [`SdkError<ImportImageError>`](crate::operation::import_image::ImportImageError)
    pub fn import_image(
        &self,
    ) -> crate::operation::import_image::builders::ImportImageFluentBuilder {
        crate::operation::import_image::builders::ImportImageFluentBuilder::new(self.handle.clone())
    }
}