BuilderImageByParent
Creates a custom image based on an existing image and starts an image creation task.
Operation description
Before you call this operation, make sure that the parent image is available and an available image distribution record exists in the creation region.
Call ListImage to obtain the parent image ID.
Specify the creation mode, cloud disk capacity, and resource type, and then call this operation.
Save the returned ImageId, VersionId, and TaskId.
Call GetTask to query the creation progress. A successful request does not indicate that the image creation is complete.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:BuilderImageByParent |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageName |
string |
No |
The name of the new image. Required. The name must start with a letter or a Chinese character and can contain letters, digits, Chinese characters, colons (:), underscores (_), periods (.), and hyphens (-). It cannot start with http:// or https://. The name must be 2 to 64 characters in length. Each Chinese character counts as 3 characters, and each other character counts as 1 character. |
OfficeImage_202611 |
| PackageType |
string |
No |
The package type of the image. Make sure that the package type is consistent with the selected parent image and creation scenario. Valid values:
This operation does not provide the BaseImageId parameter. You cannot explicitly specify the Vhd or Container type that requires a base image to be configured separately. |
Ecs |
| BizType |
integer |
No |
The business type to which the image belongs. Required. Valid values:
|
1 |
| ProductType |
string |
No |
The product to which the image belongs. Required. Use an activated product and make sure that it is consistent with the selected parent image. Valid values:
|
CloudApp |
| Language |
string |
No |
The language of the image. Valid values:
|
zh-CN |
| Description |
string |
No |
The description of the new image. This helps you query and distinguish images later. |
Business image that includes office applications and standard configurations |
| ParentImageId |
string |
Yes |
The ID of the parent image used to create the new image. Required. You can call ListImage to query the ID. An available distribution record of the parent image must exist in the creation region. |
imgc-bp1parent**** |
| PropertyMap |
object |
No |
The extended properties of the image. Both keys and values are strings. You can omit this parameter if no extended configuration is required. The property key for the driver list is DRIVER_LIST, and the value is a JSON string of an array of driver IDs. We recommend that you specify drivers by using DriverIdList. If both DriverIdList and PropertyMap.DRIVER_LIST are specified, DriverIdList takes precedence. Specify other extended properties only when you have confirmed their purposes and values. |
{"DRIVER_LIST":"[\"6d4af751-f522-40d7-ab6c-4a0ae587****\",\"b5bdf6c0-41de-4878-8963-e8324106****\"]"} |
|
string |
No |
The string value of an extended property of the image. |
["6d4af751-f522-40d7-ab6c-4a0ae587****","b5bdf6c0-41de-4878-8963-e8324106****"] |
|
| ImageCreateMode |
string |
Yes |
The image creation mode. Use the following mode:
|
BUILDER_MANUAL |
| SystemDiskSize |
integer |
Yes |
The capacity of the system cloud disk in the creation environment. Unit: GiB. The capacity cannot be smaller than the system cloud disk capacity required by the parent image and must meet the cloud disk requirements of the selected resource specifications. |
80 |
| DataDiskSize |
integer |
No |
The capacity of the data cloud disk in the creation environment. Unit: GiB. Specify this parameter when a data cloud disk is required and make sure that the capacity meets the cloud disk requirements of the selected resource specifications. |
100 |
| PerformanceType |
string |
Yes |
The computing type of the creation resources. 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 resources. The ResourceType and Resource of each resource must correspond to each other. |
|
|
object |
No |
|||
| ResourceType |
string |
No |
The provision method of the resource content. Valid values:
|
URL |
| Resource |
string |
No |
The resource content that corresponds to ResourceType. For the URL type, enter or return an accessible resource URL. |
https://example.com/apps/business/setup.exe |
| RunMode |
string |
No |
The running mode of the image creation environment. Valid values:
|
NORMAL |
| VersionName |
string |
No |
The display name of the new image version. This helps you distinguish different versions of the same image. |
Office environment-202611 |
| Distro |
string |
No |
The operating system distribution information of the image. Enter a distribution identifier that is consistent with the parent image used. |
Ubuntu 22.04 64-bit |
| SourceRegion |
string |
No |
The ID of the creation region. The selected parent image must have been distributed to this region. Available regions are also affected by the region configurations of the account and product. |
cn-hangzhou |
| DriverIdList |
array |
No |
The list of driver IDs used when creating the image. You can specify up to 200 driver IDs. When you need to specify drivers, enter the IDs of existing drivers that are applicable to the target image. If PropertyMap.DRIVER_LIST is also specified, this parameter overwrites the driver list in PropertyMap.DRIVER_LIST. |
["6d4af751-f522-40d7-ab6c-4a0ae587****","b5bdf6c0-41de-4878-8963-e8324106****"] |
|
string |
No |
The ID of an existing image driver. |
6d4af751-f522-40d7-ab6c-4a0ae587**** |
|
| OfficeSiteId |
string |
No |
The ID of the office network used by the creation resources. Specify this parameter when a specific office network is required and make sure that the office network is in the creation region. |
cn-hangzhou+dir-example**** |
| NodeInstanceType |
string |
No |
The ID of the node specifications for the creation resources. You can call ListNodeInstanceType to query the ID. Select node specifications that are active in the creation region and for the associated product, and that meet the CPU or GPU computing requirements. |
appstreaming.general.4c8g |
| VSwitchIdList |
array |
No |
The list of vSwitch IDs used by the creation resources. You can specify up to 100 vSwitch IDs. The vSwitches must belong to the selected office network and be located in the creation region. |
|
|
string |
No |
The ID of a vSwitch in the creation region. |
vsw-bp1example**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response of the API call. |
||
| Data |
object |
The business data returned by the operation. |
|
| ImageId |
string |
The ID of the image. You can use this ID to query or modify the image later. |
imgc-bp1example**** |
| VersionId |
string |
The ID of the image version. You can use this ID to query or manage the specified version of the image. |
iv-bp1example**** |
| TaskId |
string |
The ID of the task. You can use this ID to call GetTask to query the task status. |
tid-bp1example**** |
| Success |
boolean |
Indicates whether the request is successful. A value of true indicates that the request is successful. To check whether the asynchronous task is complete, you must query the task status separately. |
|
| Code |
string |
The error code. This parameter is returned when the request fails. A successful response may not contain this parameter. |
ExceedBuilderQuota |
| Message |
string |
The error message or result prompt. This parameter describes the cause of a failed request. A successful response may not contain this parameter. |
The maximum number of builders is reached. |
| RequestId |
string |
The unique identifier of the request. You can provide this value for troubleshooting. |
01A1A962-5503-107B-AC8F-EBA85DF905AC |
Examples
Success response
JSON format
{
"Data": {
"ImageId": "imgc-bp1example****",
"VersionId": "iv-bp1example****",
"TaskId": "tid-bp1example****"
},
"Success": false,
"Code": "ExceedBuilderQuota",
"Message": "The maximum number of builders is reached.",
"RequestId": "01A1A962-5503-107B-AC8F-EBA85DF905AC"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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 | ImageCreateByInstance.TaskExist | The image task of instance creation already exists. | The image task of instance creation already exists. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.