amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.ImportImage

Description

Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).

Amazon Web Services VM Import/Export strongly recommends specifying a value for either the --license-type or --usage-operation parameter when you create a new VM Import task. This ensures your operating system is licensed appropriately and your billing is optimized.

For more information, see Importing a VM as an image using VM Import/Export in the VM Import/Export User Guide.

Synopsis

Creating a Request

data ImportImage Source #

See: newImportImage smart constructor.

Constructors

ImportImage' 

Fields

  • architecture :: Maybe Text

    The architecture of the virtual machine.

    Valid values: i386 | x86_64

  • bootMode :: Maybe BootModeValues

    The boot mode of the virtual machine.

  • clientData :: Maybe ClientData

    The client-specific data.

  • clientToken :: Maybe Text

    The token to enable idempotency for VM import requests.

  • description :: Maybe Text

    A description string for the import image task.

  • diskContainers :: Maybe [ImageDiskContainer]

    Information about the disk containers.

  • dryRun :: Maybe Bool

    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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • encrypted :: Maybe Bool

    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 KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

  • hypervisor :: Maybe Text

    The target hypervisor platform.

    Valid values: xen

  • kmsKeyId :: Maybe Text

    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 KmsKeyId is specified, the Encrypted flag must also be set.

    The KMS key identifier may be provided in any of the following formats:

    • Key ID
    • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
    • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
    • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

    The specified KMS key must exist in the Region that the AMI is being copied to.

    Amazon EBS does not support asymmetric KMS keys.

  • licenseSpecifications :: Maybe [ImportImageLicenseConfigurationRequest]

    The ARNs of the license configurations.

  • licenseType :: Maybe Text

    The license type to be used for the Amazon Machine Image (AMI) after importing.

    Specify AWS to replace the source-system license with an Amazon Web Services license or BYOL to retain the source-system license. Leaving this parameter undefined is the same as choosing AWS when importing a Windows Server operating system, and the same as choosing BYOL when importing a Windows client operating system (such as Windows 10) or a Linux operating system.

    To use BYOL, 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 Prerequisites in the VM Import/Export User Guide.

  • platform :: Maybe Text

    The operating system of the virtual machine.

    Valid values: Windows | Linux

  • roleName :: Maybe Text

    The name of the role to use when not using the default role, 'vmimport'.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to apply to the import image task during creation.

  • usageOperation :: Maybe Text

    The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide.

Instances

Instances details
ToHeaders ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Methods

toHeaders :: ImportImage -> [Header] #

ToPath ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

ToQuery ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

AWSRequest ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Associated Types

type AWSResponse ImportImage #

Generic ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Associated Types

type Rep ImportImage :: Type -> Type #

Read ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Show ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

NFData ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Methods

rnf :: ImportImage -> () #

Eq ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Hashable ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

type AWSResponse ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

type Rep ImportImage Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

type Rep ImportImage = D1 ('MetaData "ImportImage" "Amazonka.EC2.ImportImage" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ImportImage'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "architecture") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bootMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BootModeValues))) :*: (S1 ('MetaSel ('Just "clientData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ClientData)) :*: S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "diskContainers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ImageDiskContainer]))) :*: (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "encrypted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))))) :*: (((S1 ('MetaSel ('Just "hypervisor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "licenseSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ImportImageLicenseConfigurationRequest])) :*: S1 ('MetaSel ('Just "licenseType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "platform") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "roleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])) :*: S1 ('MetaSel ('Just "usageOperation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))))

newImportImage :: ImportImage Source #

Create a value of ImportImage with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ImportImage, importImage_architecture - The architecture of the virtual machine.

Valid values: i386 | x86_64

ImportImage, importImage_bootMode - The boot mode of the virtual machine.

$sel:clientData:ImportImage', importImage_clientData - The client-specific data.

ImportImage, importImage_clientToken - The token to enable idempotency for VM import requests.

ImportImage, importImage_description - A description string for the import image task.

$sel:diskContainers:ImportImage', importImage_diskContainers - Information about the disk containers.

$sel:dryRun:ImportImage', importImage_dryRun - 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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

ImportImage, importImage_encrypted - 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 KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

ImportImage, importImage_hypervisor - The target hypervisor platform.

Valid values: xen

ImportImage, importImage_kmsKeyId - 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 KmsKeyId is specified, the Encrypted flag must also be set.

The KMS key identifier may be provided in any of the following formats:

  • Key ID
  • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
  • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
  • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified KMS key must exist in the Region that the AMI is being copied to.

Amazon EBS does not support asymmetric KMS keys.

ImportImage, importImage_licenseSpecifications - The ARNs of the license configurations.

ImportImage, importImage_licenseType - The license type to be used for the Amazon Machine Image (AMI) after importing.

Specify AWS to replace the source-system license with an Amazon Web Services license or BYOL to retain the source-system license. Leaving this parameter undefined is the same as choosing AWS when importing a Windows Server operating system, and the same as choosing BYOL when importing a Windows client operating system (such as Windows 10) or a Linux operating system.

To use BYOL, 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 Prerequisites in the VM Import/Export User Guide.

ImportImage, importImage_platform - The operating system of the virtual machine.

Valid values: Windows | Linux

$sel:roleName:ImportImage', importImage_roleName - The name of the role to use when not using the default role, 'vmimport'.

ImportImage, importImage_tagSpecifications - The tags to apply to the import image task during creation.

ImportImage, importImage_usageOperation - The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide.

Request Lenses

importImage_architecture :: Lens' ImportImage (Maybe Text) Source #

The architecture of the virtual machine.

Valid values: i386 | x86_64

importImage_bootMode :: Lens' ImportImage (Maybe BootModeValues) Source #

The boot mode of the virtual machine.

importImage_clientToken :: Lens' ImportImage (Maybe Text) Source #

The token to enable idempotency for VM import requests.

importImage_description :: Lens' ImportImage (Maybe Text) Source #

A description string for the import image task.

importImage_diskContainers :: Lens' ImportImage (Maybe [ImageDiskContainer]) Source #

Information about the disk containers.

importImage_dryRun :: Lens' ImportImage (Maybe Bool) Source #

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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

importImage_encrypted :: Lens' ImportImage (Maybe Bool) Source #

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 KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

importImage_hypervisor :: Lens' ImportImage (Maybe Text) Source #

The target hypervisor platform.

Valid values: xen

importImage_kmsKeyId :: Lens' ImportImage (Maybe Text) Source #

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 KmsKeyId is specified, the Encrypted flag must also be set.

The KMS key identifier may be provided in any of the following formats:

  • Key ID
  • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
  • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
  • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified KMS key must exist in the Region that the AMI is being copied to.

Amazon EBS does not support asymmetric KMS keys.

importImage_licenseType :: Lens' ImportImage (Maybe Text) Source #

The license type to be used for the Amazon Machine Image (AMI) after importing.

Specify AWS to replace the source-system license with an Amazon Web Services license or BYOL to retain the source-system license. Leaving this parameter undefined is the same as choosing AWS when importing a Windows Server operating system, and the same as choosing BYOL when importing a Windows client operating system (such as Windows 10) or a Linux operating system.

To use BYOL, 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 Prerequisites in the VM Import/Export User Guide.

importImage_platform :: Lens' ImportImage (Maybe Text) Source #

The operating system of the virtual machine.

Valid values: Windows | Linux

importImage_roleName :: Lens' ImportImage (Maybe Text) Source #

The name of the role to use when not using the default role, 'vmimport'.

importImage_tagSpecifications :: Lens' ImportImage (Maybe [TagSpecification]) Source #

The tags to apply to the import image task during creation.

importImage_usageOperation :: Lens' ImportImage (Maybe Text) Source #

The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide.

Destructuring the Response

data ImportImageResponse Source #

See: newImportImageResponse smart constructor.

Constructors

ImportImageResponse' 

Fields

Instances

Instances details
Generic ImportImageResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Associated Types

type Rep ImportImageResponse :: Type -> Type #

Read ImportImageResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Show ImportImageResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

NFData ImportImageResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

Methods

rnf :: ImportImageResponse -> () #

Eq ImportImageResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

type Rep ImportImageResponse Source # 
Instance details

Defined in Amazonka.EC2.ImportImage

type Rep ImportImageResponse = D1 ('MetaData "ImportImageResponse" "Amazonka.EC2.ImportImage" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ImportImageResponse'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "architecture") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "encrypted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "hypervisor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "imageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "importTaskId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "licenseSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ImportImageLicenseConfigurationResponse]))))) :*: (((S1 ('MetaSel ('Just "licenseType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "platform") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "progress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "snapshotDetails") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SnapshotDetail])))) :*: ((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "statusMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: (S1 ('MetaSel ('Just "usageOperation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))))

newImportImageResponse Source #

Create a value of ImportImageResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ImportImage, importImageResponse_architecture - The architecture of the virtual machine.

ImportImage, importImageResponse_description - A description of the import task.

ImportImage, importImageResponse_encrypted - Indicates whether the AMI is encrypted.

ImportImage, importImageResponse_hypervisor - The target hypervisor of the import task.

ImportImageResponse, importImageResponse_imageId - The ID of the Amazon Machine Image (AMI) created by the import task.

ImportImageResponse, importImageResponse_importTaskId - The task ID of the import image task.

ImportImage, importImageResponse_kmsKeyId - The identifier for the symmetric KMS key that was used to create the encrypted AMI.

ImportImage, importImageResponse_licenseSpecifications - The ARNs of the license configurations.

ImportImage, importImageResponse_licenseType - The license type of the virtual machine.

ImportImage, importImageResponse_platform - The operating system of the virtual machine.

ImportImageResponse, importImageResponse_progress - The progress of the task.

ImportImageResponse, importImageResponse_snapshotDetails - Information about the snapshots.

ImportImageResponse, importImageResponse_status - A brief status of the task.

ImportImageResponse, importImageResponse_statusMessage - A detailed status message of the import task.

ImportImageResponse, importImageResponse_tags - Any tags assigned to the import image task.

ImportImage, importImageResponse_usageOperation - The usage operation value.

$sel:httpStatus:ImportImageResponse', importImageResponse_httpStatus - The response's http status code.

Response Lenses

importImageResponse_architecture :: Lens' ImportImageResponse (Maybe Text) Source #

The architecture of the virtual machine.

importImageResponse_encrypted :: Lens' ImportImageResponse (Maybe Bool) Source #

Indicates whether the AMI is encrypted.

importImageResponse_hypervisor :: Lens' ImportImageResponse (Maybe Text) Source #

The target hypervisor of the import task.

importImageResponse_imageId :: Lens' ImportImageResponse (Maybe Text) Source #

The ID of the Amazon Machine Image (AMI) created by the import task.

importImageResponse_importTaskId :: Lens' ImportImageResponse (Maybe Text) Source #

The task ID of the import image task.

importImageResponse_kmsKeyId :: Lens' ImportImageResponse (Maybe Text) Source #

The identifier for the symmetric KMS key that was used to create the encrypted AMI.

importImageResponse_licenseType :: Lens' ImportImageResponse (Maybe Text) Source #

The license type of the virtual machine.

importImageResponse_platform :: Lens' ImportImageResponse (Maybe Text) Source #

The operating system of the virtual machine.

importImageResponse_statusMessage :: Lens' ImportImageResponse (Maybe Text) Source #

A detailed status message of the import task.

importImageResponse_tags :: Lens' ImportImageResponse (Maybe [Tag]) Source #

Any tags assigned to the import image task.