Skip to content

/AWS1/CL_IMG=>IMPORTDISKIMAGE()

About ImportDiskImage

Import a Windows operating system image from a verified Microsoft ISO disk file. The following disk images are supported:

  • Windows 11 Enterprise

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING

The name of the image resource that's created from the import.

iv_semanticversion TYPE /AWS1/IMGVERSIONNUMBER /AWS1/IMGVERSIONNUMBER

The semantic version to attach to the image that's created during the import process. This version follows the semantic version syntax.

iv_platform TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING

The operating system platform for the imported image. Allowed values include the following: Windows.

iv_osversion TYPE /AWS1/IMGOSVERSION /AWS1/IMGOSVERSION

The operating system version for the imported image. Allowed values include the following: Microsoft Windows 11.

iv_infrastructureconfarn TYPE /AWS1/IMGINFRASTRUCTURECONFARN /AWS1/IMGINFRASTRUCTURECONFARN

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.

iv_uri TYPE /AWS1/IMGURI /AWS1/IMGURI

The uri of the ISO disk file that's stored in Amazon S3.

iv_clienttoken TYPE /AWS1/IMGCLIENTTOKEN /AWS1/IMGCLIENTTOKEN

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

Optional arguments:

iv_description TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING

The description for your disk image import.

iv_executionrole TYPE /AWS1/IMGROLENAMEORARN /AWS1/IMGROLENAMEORARN

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.

it_tags TYPE /AWS1/CL_IMGTAGMAP_W=>TT_TAGMAP TT_TAGMAP

Tags that are attached to image resources created from the import.

RETURNING

oo_output TYPE REF TO /aws1/cl_imgimportdiskimagersp /AWS1/CL_IMGIMPORTDISKIMAGERSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_img~importdiskimage(
  it_tags = VALUE /aws1/cl_imgtagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_imgtagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_imgtagmap_w( |string| )
      )
    )
  )
  iv_clienttoken = |string|
  iv_description = |string|
  iv_executionrole = |string|
  iv_infrastructureconfarn = |string|
  iv_name = |string|
  iv_osversion = |string|
  iv_platform = |string|
  iv_semanticversion = |string|
  iv_uri = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_clienttoken = lo_result->get_clienttoken( ).
  lv_imagebuildversionarn = lo_result->get_imagebuildversionarn( ).
ENDIF.