import_disk_image
async
¶
import_disk_image(
name: ResourceName,
semantic_version: VersionNumber,
platform: NonEmptyString,
os_version: OsVersion,
infrastructure_configuration_arn: InfrastructureConfigurationArn,
uri: Uri,
client_token: ClientToken,
*,
config_overrides: Optional[AsyncimagebuilderClientConfig] = None,
description: Optional[NonEmptyString] = None,
execution_role: Optional[RoleNameOrArn] = None,
logging_configuration: Optional[ImageLoggingConfiguration] = None,
tags: Optional[TagMap] = None,
register_image_options: Optional[RegisterImageOptions] = None,
windows_configuration: Optional[WindowsConfiguration] = None,
) -> ImportDiskImageResponse
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 PENDING state. The conversion from ISO file to AMI then runs asynchronously on an EC2 instance that Image Builder launches with the specified infrastructure configuration.
Parameters:
-
name(ResourceName) –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.
-
semantic_version(VersionNumber) –The semantic version to attach to the image that's created during the import process. This version follows the semantic version syntax.
-
description(Optional[NonEmptyString], default:None) –The description for your disk image import.
-
platform(NonEmptyString) –The operating system platform for the imported image. Allowed values include the following:
Windows. -
os_version(OsVersion) –The operating system version for the imported image. The only supported value is
Microsoft Windows 11. -
execution_role(Optional[RoleNameOrArn], default:None) –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.
-
infrastructure_configuration_arn(InfrastructureConfigurationArn) –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(Uri) –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. -
logging_configuration(Optional[ImageLoggingConfiguration], default:None) –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. -
tags(Optional[TagMap], default:None) –Tags that are attached to image resources created from the import.
-
register_image_options(Optional[RegisterImageOptions], default:None) –Configures Secure Boot and UEFI settings for the imported image.
-
windows_configuration(Optional[WindowsConfiguration], default:None) –Specifies Windows settings for ISO imports.
-
client_token(ClientToken) –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.
Raises:
-
AccessDeniedException–You do not have permissions to perform the requested operation.
-
ClientException–A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.
-
ServiceException–An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.
-
ServiceUnavailableException–The service is unable to process your request at this time.
-
TooManyRequestsException–You have attempted too many requests for the specific operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Import a Windows 11 ISO disk image The following example starts an image build that converts a Windows 11 ISO disk file stored in Amazon S3 into an AMI; the imageBuildVersionArn in the response identifies the Image Builder image resource that tracks the build, not the output AMI.
>>> await client.import_disk_image(name='my-example-imported-image', semantic_version='1.0.0', platform='Windows', os_version='Microsoft Windows 11', uri='s3://amzn-s3-demo-bucket/Win11_23H2_English_x64.iso', infrastructure_configuration_arn='arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure', client_token='a1b2c3d4-5678-90ab-cdef-EXAMPLE12345')
Source code in docs_src/capo_imagebuilder/_services/async_imagebuilder.py
3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 | |