All Products
Search
Document Center

App Streaming:CreateImageByInstance

Last Updated:Jun 17, 2026

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

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

  • CloudDesktop :

    Cloud desktop.

  • WuyingServer :

    Workstation.

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:

  • true :

    clear.

  • false :

    do not clear.

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:

  • SYSTEM :

    system cloud disk only.

  • ALL :

    system cloud disk and data cloud disk.

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.