Creates a custom image from a deployed WUYING instance. You can use the custom image to quickly create more WUYING instances with the same configurations, without having to repeatedly configure the instance environment each time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:CreateImageByInstance |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageName |
string |
No |
The image name. |
test |
| Description |
string |
No |
The image description. |
my test image v1.0 |
| InstanceId |
string |
No |
The WUYING instance ID. The instance can be a cloud desktop instance or a workstation instance. To ensure data consistency in the image, stop the instance before creating the image. |
ws-0buj1s9gm****** |
| SubInstanceId |
string |
No |
The sub-instance ID. This parameter is not applicable to cloud desktop scenarios. In workstation scenarios, specify the persistent session ID to identify a specific instance. |
p-0cc7s3n1l***** |
| InstanceType |
string |
No |
The instance type. Valid values:
|
WuyingServer |
| AutoCleanUserdata |
boolean |
No |
This parameter is applicable only when the instance type is cloud desktop. Specifies whether to clear user personal data. If you set this parameter to true, the created image clears data in all directories under C:\Users except the Administrator and Public directories. Valid values:
|
false |
| DiskType |
string |
No |
The type of disk data included in the image. By default, the image includes both the system cloud disk and data cloud disk of the instance. Valid values:
|
ALL |
| BizType |
integer |
No |
This parameter is not publicly available. |
1 |
| ProductType |
string |
No |
This parameter is not publicly available. |
WuyingServer |
| TagList |
array<object> |
No |
||
|
object |
No |
|||
| Key |
string |
No |
||
| Value |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| Data |
object |
The returned object. |
|
| ImageId |
string |
The WUYING image ID. |
imgc-07hnjj5fp**** |
| VersionId |
string |
The image version. |
iv-0abxi0lbi***** |
| TaskId |
string |
The task ID for creating the image. |
tid-0abxi0lbih****** |
| Success |
boolean |
Indicates whether the request was successful. A value of true indicates success. A value of false indicates failure. |
true |
| Code |
string |
The error code returned if the request failed. |
200 |
| Message |
string |
The error message returned if the request failed. |
NULL |
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"Data": {
"ImageId": "imgc-07hnjj5fp****",
"VersionId": "iv-0abxi0lbi*****",
"TaskId": "tid-0abxi0lbih******"
},
"Success": true,
"Code": "200",
"Message": "NULL",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Instance.NotFound | The instance is not found. | The instance is not found. |
| 400 | DesktopInstance.NotFound | The cloud computer instance does not exist. | The cloud computer instance does not exist. |
| 400 | Instance.ImageUnsupported | A non-centralized image does not support this type of operation. | A non-centralized image does not support this type of operation. |
| 400 | Instance.PhysicalNodeNotExist | The instance physical node does not exist. | The physical node of this instance does not exist. |
| 400 | ImageCreateByInstance.TaskExist | The image task of instance creation already exists. | The image task of instance creation already exists. |
| 400 | ExceedBuilderQuota | The maximum number of builders is reached. | The maximum number of builders is reached. |
| 400 | InvalidBaseImage.NotConfigured | Configuration required for Vhd/Container images. | Configuration required for Vhd/Container images. |
| 400 | CreateDesktopImageRecord.Failed | Create cloud computer image failed. | Failed to create the cloud computer image. |
| 400 | Image.NotExist | The image does not exist. | The image does not exist. |
| 400 | ImageRegionDistribute.NotAllow | This image cannot be distributed. | This image cannot be distributed. |
| 400 | ImageUpdateFailed.NotAllow | The image is not allowed to be modified. | The image is not allowed to be modified. |
| 400 | ImageUpdateSharedImageFailed.NotAllow | The shared image is not allowed to be modified. | The shared image is not allowed to be modified. |
| 400 | ParentImageRegionDistribute.NotExist | The target distribution region of the parent image does not exist. | The target distribution region of the parent image does not exist. |
| 400 | InternalError | Internal error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.