StartTaskForCreateImage

Updated at:

Starts an image creation task for an existing image version, or resumes an existing creation task.

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

    Resources without GPU.

  • GPU :

    Resources with GPU.

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:

  • TEXT :

    Text resource.

  • URL :

    URL resource.

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

BUILDER_MANUAL

RunMode

string

No

The running mode of the image creation environment. Valid values:

  • NORMAL: Normal running mode.

  • COMPATIBLE: Compatible running mode.

NORMAL

JumpStep

string

No

The step to jump to.

Valid values:

  • CREATE_VALIDATE_ENV :

    Jump to re-validation.

  • CREATE_BUILDER_ENV :

    Jump to re-creation.

CREATE_VALIDATE_ENV

ProductType

string

No

The product type. Set this parameter to the following value when you call this operation:

  • CloudApp: WUYING Cloud App.

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 indicates that the request is processed. Other values indicate that the request fails.

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.