BuilderImageByParent

Updated at:

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.

  1. Call ListImage to obtain the parent image ID.

  2. Specify the creation mode, cloud disk capacity, and resource type, and then call this operation.

  3. Save the returned ImageId, VersionId, and TaskId.

  4. Call GetTask to query the creation progress. A successful request does not indicate that the image creation is complete.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • Ecs: ECS instance image.

  • Vhd: VHD application image.

  • Container: container image.

  • Ecs_Container: combined ECS and container image.

  • K8s_Node: Kubernetes node image.

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: basic product

  • 2: personal cloud

  • 3: cloud office

  • 4: cloud flow

  • 10: personal edition

  • 20: business edition

  • 60: Linggou team edition

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:

  • CloudGame: cloud gaming

  • CloudApp: Wuying cloud application

  • CloudBrowser: secure browser

  • CloudDesktop: Wuying cloud desktop

  • ImageBuilder: image creation resource

  • ImageValidate: image validation resource

  • AndroidCloud: Android cloud

  • GpuRender: GPU rendering

  • AndroidGpuRender: Android cloud GPU rendering

  • WuyingServer: enterprise edition workstation

  • GpuProxy: GPU remote rendering proxy

  • GpuCache: GPU remote rendering cache

  • AIAgent: AI agent service

  • HostedDesktop: hosted desktop

  • WuyingWorkstation: personal edition container workstation

  • WuyingWorkstationBusiness: business edition container workstation

  • WuyingWorkstationTeam: Linggou container workstation team edition

CloudApp

Language

string

No

The language of the image. Valid values:

  • zh-CN: Simplified Chinese

  • zh-HK: Traditional Chinese (Hong Kong)

  • en-US: English

  • ja-JP: Japanese

  • CN: compatible value for Simplified Chinese

  • EN: compatible value for English

  • JP: compatible value for Japanese

  • CN-HK: compatible value for Traditional Chinese (Hong Kong)

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: manually enter the creation environment to install applications and configure the image.

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: CPU compute resources.

  • GPU: GPU compute resources.

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:

  • HOSTED: hosted resource.

  • TEXT: text resource.

  • URL: resource provided by using a URL.

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: normal running mode.

  • COMPATIBLE: compatible running mode.

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.