imagebuilder / Client / import_disk_image
import_disk_image¶
- imagebuilder.Client.import_disk_image(**kwargs)¶
Imports a Windows operating system image from a verified Microsoft ISO disk file. The following disk images are supported:
Windows 11 Enterprise
The response returns as soon as Image Builder creates the new image resource in the
PENDINGstate. The conversion from ISO file to AMI then runs asynchronously on an EC2 instance that Image Builder launches with the specified infrastructure configuration.See also: AWS API Documentation
Request Syntax
response = client.import_disk_image( name='string', semanticVersion='string', description='string', platform='string', osVersion='string', executionRole='string', infrastructureConfigurationArn='string', uri='string', loggingConfiguration={ 'logGroupName': 'string' }, tags={ 'string': 'string' }, registerImageOptions={ 'secureBootEnabled': True|False, 'uefiData': 'string' }, windowsConfiguration={ 'imageIndex': 123 }, clientToken='string' )
- Parameters:
name (string) –
[REQUIRED]
The name of the image resource that’s created from the import. Image Builder generates the image ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. If an image with the same name and semantic version already exists in your account in the same Amazon Web Services Region, the import creates a new build version for it.
semanticVersion (string) –
[REQUIRED]
The semantic version to attach to the image that’s created during the import process. This version follows the semantic version syntax.
description (string) – The description for your disk image import.
platform (string) –
[REQUIRED]
The operating system platform for the imported image. Allowed values include the following:
Windows.osVersion (string) –
[REQUIRED]
The operating system version for the imported image. The only supported value is
Microsoft Windows 11.executionRole (string) – The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions to import an image from a Microsoft ISO file. If you don’t provide a role, Image Builder uses the Image Builder service-linked role in your account, and creates it if it doesn’t exist.
infrastructureConfigurationArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration resource that’s used for launching the EC2 instance on which the ISO image is built.
uri (string) –
[REQUIRED]
The
uriof the ISO disk file that’s stored in Amazon S3, ins3://bucket/keyformat. The key must end with the.iso,.ISO, or.Isoextension, and the bucket must be owned by the account that makes the request.loggingConfiguration (dict) –
The CloudWatch Logs log group where Image Builder sends the import logs. If you specify a log group name outside of the
/aws/imagebuilder/namespace, you must also provide anexecutionRolethat has permission to write to that log group.logGroupName (string) –
The log group name that Image Builder uses for image creation. If not specified, the log group name defaults to
/aws/imagebuilder/image-name.
tags (dict) –
Tags that are attached to image resources created from the import.
(string) –
(string) –
registerImageOptions (dict) –
Configures Secure Boot and UEFI settings for the imported image.
secureBootEnabled (boolean) –
Specifies whether Secure Boot is enabled for the output AMI. The default value is
true. To disable Secure Boot for custom unsigned drivers, set this value tofalse.uefiData (string) –
A Base64-encoded representation of the non-volatile UEFI variable store. You can specify this parameter only when
secureBootEnabledistrueor unspecified. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub.For more information, see UEFI variables for Amazon EC2 instances.
windowsConfiguration (dict) –
Specifies Windows settings for ISO imports.
imageIndex (integer) – [REQUIRED]
The 1-based index that specifies which Windows edition to install from a multi-edition Windows ISO file. A Windows ISO can contain a
.wimfile with multiple image indexes, each representing a different edition.
clientToken (string) –
[REQUIRED]
A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'clientToken': 'string', 'imageBuildVersionArn': 'string' }
Response Structure
(dict) –
clientToken (string) –
The client token that uniquely identifies the request.
imageBuildVersionArn (string) –
The Amazon Resource Name (ARN) of the Image Builder image resource that this request created. The AMI doesn’t exist yet when the response returns. The import runs asynchronously, and the output AMI appears in the image’s output resources when the import completes.
Exceptions