StartTaskForCreateImage
Starts an image creation task for an existing image version, or resumes an existing creation task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:StartTaskForCreateImage |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageId |
string |
No |
The ID of the image. This parameter is not exposed by default. |
img-bp13mu**** |
| VersionId |
string |
No |
The ID of the image version. This parameter is not exposed. |
iv-bp1example**** |
| RetryType |
string |
No |
The retry type. |
RETRY |
| SystemDiskSize |
integer |
No |
The size of the system cloud disk. Unit: GB. |
100 |
| PerformanceType |
string |
No |
The resource type. Valid values:
|
CPU |
| ResourceList |
array<object> |
No |
The list of resources required for image creation, such as the download URLs of applications to be installed. You can specify up to 100 items. The ResourceType and Resource of each item must correspond to each other. |
List of Object |
|
object |
No |
The list of resources required for image creation, such as the download URLs of applications to be installed. You can specify up to 100 items. The ResourceType and Resource of each item must correspond to each other. |
Object |
|
| ResourceType |
string |
No |
The resource type. Valid values:
|
URL |
| Resource |
string |
No |
The resource information. |
https://example.com/apps/business/setup.exe |
| 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 starting the image creation task. |
ecd-5u87dainamz54yk10 |
| SubInstanceId |
string |
No |
The sub-instance ID. This parameter is not applicable to cloud desktop scenarios. In workstation scenarios, you must specify the persistent session ID to locate a specific instance. |
p-0cc7s3n1l***** |
| ImageCreateMode |
string |
No |
The image creation mode. Use the following mode:
|
BUILDER_MANUAL |
| RunMode |
string |
No |
The running mode of the image creation environment. Valid values:
|
NORMAL |
| JumpStep |
string |
No |
The step to jump to. Valid values:
|
CREATE_VALIDATE_ENV |
| ProductType |
string |
No |
The product type. Set this parameter to the following value when you call this operation:
|
CloudApp |
| SourceRegion |
string |
No |
The source region where the image is created. If you do not specify this parameter, a region is randomly selected. |
cn-shanghai |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PlainResult |
||
| Data |
string |
The returned image ID. |
imgc-dabde**** |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Code |
string |
The business status code. A value of |
200 |
| Message |
string |
The error message returned when an error occurs. |
Success |
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"Data": "imgc-dabde****",
"Success": true,
"Code": "200",
"Message": "Success",
"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. | An internal error occurred. |
| 400 | InvalidParameter.SystemDiskSize | The system disk size is invalid. | The system disk size is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.