You can call this operation to create custom images.

Description

You can create custom images from deployed cloud desktops to save and replicate the desktop environments. This enables you to create identical cloud desktops without making repeated configurations.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateImage

The operation that you want to perform. Set the value to CreateImage.

RegionId String Yes cn-hangzhou

The ID of the region.

DesktopId String Yes ecd-7w78ozhjcwa3u****

The ID of the cloud desktop.

Description String No This is description.

The description of the image. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

This parameter is empty by default.

ImageName String No testImageName

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

This parameter is empty by default.

Response parameters

Parameter Type Example Description
RequestId String F5F82BA8-92FE-49E4-AEB9-9010CE7329F3

The ID of the request.

ImageId String m-gx2x1dhsmusr2****

The ID of the image.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=CreateImage
&DesktopId=ecd-7w78ozhjcwa3u****
&ImageName=testImageName
&Description=This is description.
&<Common request parameters>

Sample success responses

XML format

<CreateImageResponse>
      <RequestId>F5F82BA8-92FE-49E4-AEB9-9010CE7329F3</RequestId>
      <ImageId>m-gx2x1dhsmusr2****</ImageId>
</CreateImageResponse>

JSON format

{
  "RequestId":"F5F82BA8-92FE-49E4-AEB9-9010CE7329F3",
  "ImageId":"m-gx2x1dhsmusr2****"
}

Error codes

For a list of error codes, visit the API Error Center.