Imports an image.
Try it now
Test
RAM authorization
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 |
镜像名称 |
| ComputeType |
string |
Yes |
The compute type. The only valid value is |
ens_vm |
| OSSRegion |
string |
No |
The ID of the region where the image file is stored. Currently, only |
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:
Currently, only |
linux |
| Platform |
string |
No |
The operating system distribution. Valid values:
|
centos |
| ImageFormat |
string |
Yes |
The format of the image file.
|
qcow2 |
| Architecture |
string |
Yes |
The architecture of the image.
Currently, only |
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 |
| 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.