ImportDiskImage
Import a Windows operating system image from a verified Microsoft ISO disk file. The following disk images are supported:
-
Windows 11 Enterprise
Request Syntax
PUT /ImportDiskImage HTTP/1.1
Content-type: application/json
{
"clientToken": "string
",
"description": "string
",
"executionRole": "string
",
"infrastructureConfigurationArn": "string
",
"name": "string
",
"osVersion": "string
",
"platform": "string
",
"semanticVersion": "string
",
"tags": {
"string
" : "string
"
},
"uri": "string
"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- clientToken
-
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 36.
Required: Yes
- description
-
The description for your disk image import.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
- executionRole
-
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.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
^(?:arn:aws(?:-[a-z]+)*:iam::[0-9]{12}:role/)?[a-zA-Z_0-9+=,.@\-_/]+$
Required: No
- 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.
Type: String
Pattern:
^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):infrastructure-configuration/[a-z0-9-_]+$
Required: Yes
- name
-
The name of the image resource that's created from the import.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: Yes
- osVersion
-
The operating system version for the imported image. Allowed values include the following:
Microsoft Windows 11
.Type: String
Length Constraints: Minimum length of 1.
Required: Yes
- platform
-
The operating system platform for the imported image. Allowed values include the following:
Windows
.Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: Yes
- semanticVersion
-
The semantic version to attach to the image that's created during the import process. This version follows the semantic version syntax.
Type: String
Pattern:
^[0-9]+\.[0-9]+\.[0-9]+$
Required: Yes
-
Tags that are attached to image resources created from the import.
Type: String to string map
Map Entries: Maximum number of 50 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Key Pattern:
^(?!aws:)[a-zA-Z+-=._:/]+$
Value Length Constraints: Maximum length of 256.
Required: No
- uri
-
The
uri
of the ISO disk file that's stored in Amazon S3.Type: String
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"clientToken": "string",
"imageBuildVersionArn": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- clientToken
-
The client token that uniquely identifies the request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 36.
- imageBuildVersionArn
-
The Amazon Resource Name (ARN) of the output AMI that was created from the ISO disk file.
Type: String
Pattern:
^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):image/[a-z0-9-_]+/[0-9]+\.[0-9]+\.[0-9]+/[0-9]+$
Errors
For information about the errors that are common to all actions, see Common Errors.
- ClientException
-
These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier.
HTTP Status Code: 400
- ServiceException
-
This exception is thrown when the service encounters an unrecoverable exception.
HTTP Status Code: 500
- ServiceUnavailableException
-
The service is unable to process your request at this time.
HTTP Status Code: 503
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: