All Products
Search
Document Center

ENS:ImportImage

Last Updated:Jan 15, 2026
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Call ImportImage to import your image file to the cloud server.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:ImportImagecreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ImageNamestringYes

Image name. The length should be [2, 128] English or Chinese characters. It must start with a letter (uppercase or lowercase) or a Chinese character, and cannot start with http:// or https://. It can contain numbers, colons (:), underscores (_), or hyphens (-).

镜像名称
ComputeTypestringYes

Image Type ens_vm: ens virtual machine image (default)

ens_vm
OSSRegionstringNo

The Region where the image is located. Currently, only cn-beijing is supported.

cn-beijing
OSSBucketstringNo

The OSS Bucket where the image file is located.

tmp-hybrid
OSSObjectstringNo

The name of the image file.

image-test
OSTypestringYes

Operating system platform type. Allowed values:

  • windows.
  • linux.

Currently, only linux is supported.

linux
PlatformstringNo

Operating system distribution. Allowed values:

  • centos
  • ubuntu
centos
ImageFormatstringYes

Image format. Allowed values:
qcow2.
Currently, only qcow2 is supported.

qcow2
ArchitecturestringYes

System architecture. Allowed values:

  • x86_64.

Currently, only x86_64 is supported.

x86_64
OSVersionstringNo

Operating system distribution version

6.8
DiskDeviceMappingarray<object>No

List of custom image information being created.

objectNo

List of custom image information being created.

OSSRegionstringNo

The Region where the image is located.

cn-beijing
OSSBucketstringNo

The OSS Bucket where the image is stored.

www-cn
OSSObjectstringNo

The filename (key) of the image file after it is uploaded to the OSS Bucket.

image-bucket
TargetOSSRegionIdstringNo

The target OSS region where the image will be stored.

Note Currently, only cn-beijing and ap-southeast-1 are supported.
cn-beijing

Response parameters

ParameterTypeDescriptionExample
object

Response schema

RequestIdstring

ID of the request

CEF72CEB-54B6-4AE8-B225-F876FF7BA984
ImageIdstring

Image ID.

m-5wn1dh*******b48f440ntvad

Examples

Sample success responses

JSONformat

{
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "ImageId": "m-5wn1dh*******b48f440ntvad"
}

Error codes

HTTP status codeError codeError message
400NoPermissionPermission denied.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2026-01-08The Error code has changedView Change Details
2025-11-03The Error code has changedView Change Details