All Products
Search
Document Center

ENS:ImportImage

Last Updated:Mar 27, 2026

Imports an image.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ImageName

string

Yes

The name of the image. The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character and cannot start with http:// or https://. The name can contain digits, colons (:), underscores (_), and hyphens (-).

镜像名称

ComputeType

string

Yes

The compute type. The only valid value is ens_vm (ENS VM Image), which is also the default.

ens_vm

OSSRegion

string

No

The ID of the region where the image file is stored. Currently, only cn-beijing is supported.

cn-beijing

OSSBucket

string

No

The OSS bucket where the image file is stored.

tmp-hybrid

OSSObject

string

No

The name of the image object in the OSS bucket.

image-test

OSType

string

Yes

The operating system type. Valid values:

  • windows

  • linux

Currently, only linux is supported.

linux

Platform

string

No

The operating system distribution. Valid values:

  • centos

  • ubuntu

centos

ImageFormat

string

Yes

The format of the image file.
The only valid value is qcow2.



qcow2

Architecture

string

Yes

The architecture of the image.

  • x86_64

Currently, only x86_64 is supported.

x86_64

OSVersion

string

No

The version of the operating system distribution.

6.8

DiskDeviceMapping

array<object>

No

The disk device mappings.

object

No

A disk device mapping.

OSSRegion

string

No

The region where the image is located.

cn-beijing

OSSBucket

string

No

The OSS bucket that stores the image.

www-cn

OSSObject

string

No

The key (file name) of the image file in the OSS bucket.

image-bucket

TargetOSSRegionId

string

No

The ID of the destination region to store the image.

Note

Currently, only cn-beijing (China (Beijing)) and ap-southeast-1 (Asia Pacific SE 1 (Singapore)) are supported.

cn-beijing

LicenseType

string

No

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The ID of the request.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

ImageId

string

The ID of the image.

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

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 NoPermission Permission denied.
400 InvalidParameter.%s The specified field %s invalid. Please check it again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.