Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data ImportImage = ImportImage' {
- architecture :: Maybe Text
- bootMode :: Maybe BootModeValues
- clientData :: Maybe ClientData
- clientToken :: Maybe Text
- description :: Maybe Text
- diskContainers :: Maybe [ImageDiskContainer]
- dryRun :: Maybe Bool
- encrypted :: Maybe Bool
- hypervisor :: Maybe Text
- kmsKeyId :: Maybe Text
- licenseSpecifications :: Maybe [ImportImageLicenseConfigurationRequest]
- licenseType :: Maybe Text
- platform :: Maybe Text
- roleName :: Maybe Text
- tagSpecifications :: Maybe [TagSpecification]
- usageOperation :: Maybe Text
- newImportImage :: ImportImage
- importImage_architecture :: Lens' ImportImage (Maybe Text)
- importImage_bootMode :: Lens' ImportImage (Maybe BootModeValues)
- importImage_clientData :: Lens' ImportImage (Maybe ClientData)
- importImage_clientToken :: Lens' ImportImage (Maybe Text)
- importImage_description :: Lens' ImportImage (Maybe Text)
- importImage_diskContainers :: Lens' ImportImage (Maybe [ImageDiskContainer])
- importImage_dryRun :: Lens' ImportImage (Maybe Bool)
- importImage_encrypted :: Lens' ImportImage (Maybe Bool)
- importImage_hypervisor :: Lens' ImportImage (Maybe Text)
- importImage_kmsKeyId :: Lens' ImportImage (Maybe Text)
- importImage_licenseSpecifications :: Lens' ImportImage (Maybe [ImportImageLicenseConfigurationRequest])
- importImage_licenseType :: Lens' ImportImage (Maybe Text)
- importImage_platform :: Lens' ImportImage (Maybe Text)
- importImage_roleName :: Lens' ImportImage (Maybe Text)
- importImage_tagSpecifications :: Lens' ImportImage (Maybe [TagSpecification])
- importImage_usageOperation :: Lens' ImportImage (Maybe Text)
- data ImportImageResponse = ImportImageResponse' {
- architecture :: Maybe Text
- description :: Maybe Text
- encrypted :: Maybe Bool
- hypervisor :: Maybe Text
- imageId :: Maybe Text
- importTaskId :: Maybe Text
- kmsKeyId :: Maybe Text
- licenseSpecifications :: Maybe [ImportImageLicenseConfigurationResponse]
- licenseType :: Maybe Text
- platform :: Maybe Text
- progress :: Maybe Text
- snapshotDetails :: Maybe [SnapshotDetail]
- status :: Maybe Text
- statusMessage :: Maybe Text
- tags :: Maybe [Tag]
- usageOperation :: Maybe Text
- httpStatus :: Int
- newImportImageResponse :: Int -> ImportImageResponse
- importImageResponse_architecture :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_description :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_encrypted :: Lens' ImportImageResponse (Maybe Bool)
- importImageResponse_hypervisor :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_imageId :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_importTaskId :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_kmsKeyId :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_licenseSpecifications :: Lens' ImportImageResponse (Maybe [ImportImageLicenseConfigurationResponse])
- importImageResponse_licenseType :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_platform :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_progress :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_snapshotDetails :: Lens' ImportImageResponse (Maybe [SnapshotDetail])
- importImageResponse_status :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_statusMessage :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_tags :: Lens' ImportImageResponse (Maybe [Tag])
- importImageResponse_usageOperation :: Lens' ImportImageResponse (Maybe Text)
- importImageResponse_httpStatus :: Lens' ImportImageResponse Int
Creating a Request
data ImportImage Source #
See: newImportImage
smart constructor.
ImportImage' | |
|
Instances
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, thealias
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, thekey
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, thealias
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_clientData :: Lens' ImportImage (Maybe ClientData) Source #
The client-specific data.
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, thealias
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, thekey
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, thealias
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_licenseSpecifications :: Lens' ImportImage (Maybe [ImportImageLicenseConfigurationRequest]) Source #
The ARNs of the license configurations.
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.
ImportImageResponse' | |
|
Instances
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_description :: Lens' ImportImageResponse (Maybe Text) Source #
A description of the import task.
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_licenseSpecifications :: Lens' ImportImageResponse (Maybe [ImportImageLicenseConfigurationResponse]) Source #
The ARNs of the license configurations.
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_progress :: Lens' ImportImageResponse (Maybe Text) Source #
The progress of the task.
importImageResponse_snapshotDetails :: Lens' ImportImageResponse (Maybe [SnapshotDetail]) Source #
Information about the snapshots.
importImageResponse_status :: Lens' ImportImageResponse (Maybe Text) Source #
A brief status of the task.
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.
importImageResponse_usageOperation :: Lens' ImportImageResponse (Maybe Text) Source #
The usage operation value.
importImageResponse_httpStatus :: Lens' ImportImageResponse Int Source #
The response's http status code.