All Products
Search
Document Center

App Streaming:CreateImageByInstance

Last Updated:Jul 04, 2026

Create a custom image from a deployed Wuying cloud desktop to quickly create additional desktops with the same configuration. This eliminates the need to reconfigure the environment for each new instance.

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 name of the image.

test

Description

string

No

The description of the image.

my test image v1.0

InstanceId

string

No

The ID of the source Elastic Desktop Service instance. The instance can be a cloud desktop or a workstation. To ensure data consistency, we recommend that you shut down the instance before you create the image.

ws-0buj1s9gm******

SubInstanceId

string

No

The ID of the sub-instance. This parameter does not apply to cloud desktop instances. For workstation instances, specify the persistent session ID.

p-0cc7s3n1l*****

InstanceType

string

No

The instance type.

Valid values:

  • CloudDesktop :

    A cloud desktop.

  • WuyingServer :

    A workstation.

WuyingServer

AutoCleanUserdata

boolean

No

Specifies whether to clear user data. This parameter applies only to cloud desktop instances. If set to true, data in all directories under C:\Users is cleared, except for the Administrator and Public directories.

Valid values:

  • true :

    Clears user data.

  • false :

    Does not clear user data.

false

DiskType

string

No

Specifies which disks to include in the image. By default, both the system disk and data disks are included.

Valid values:

  • SYSTEM :

    Only the system disk.

  • ALL :

    The system disk and data disks.

ALL

BizType

integer

No

This parameter is reserved for internal use.

1

ProductType

string

No

This parameter is reserved for internal use.

WuyingServer

TagList

array<object>

No

object

No

Key

string

No

Value

string

No

Response elements

Element

Type

Description

Example

object

The response body.

Data

object

The data object.

ImageId

string

The ID of the Wuying image.

imgc-07hnjj5fp****

VersionId

string

The image version.

iv-0abxi0lbi*****

TaskId

string

The ID of the image creation task.

tid-0abxi0lbih******

Success

boolean

Indicates whether the request was successful.

true

Code

string

The error code returned if the request fails.

200

Message

string

The error message returned if the request fails.

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.