All Products
Search
Document Center

Elastic Desktop Service:CreateTemplate

Last Updated:Mar 03, 2026

Creates a custom cloud computer template. A cloud computer template (or simply "template") simplifies the process of creating cloud computers by providing a predefined set of configurations. This eliminates the need to manually configure each setting, saving significant time and effort.

Operation description

When you call this operation, take note of the following item:

  • Most parameters in templates are optional. When you create a template, Elastic Desktop Service (EDS) does not validate the existence or correctness of the parameter values you specify. The parameter values in the template are only verified when you use the template to create cloud computers.

  • For parameters that include the region attribute in the template, it's important to note that if the specified region doesn't match the region where the template is used to create a cloud computer, those parameters will not take effect.

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

ecd:CreateTemplate

create

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

TemplateName

string

Yes

The template name. It must meet the following criteria:

  • It can be 2 to 126 characters in length.

  • It must begin with a letter and cannot start with http:// or https://.

  • It can contain letters, digits, colons (:), underscores (_), and hyphens (-). Note: Periods (.) are not supported in the name.

我的云电脑模板001

Description

string

No

The template description. It must meet the following criteria:

  • It can be 2 to 256 characters in length and cannot start with http:// or https://.

  • It can contain letters, digits, and special characters, including spaces. Note: You can use carriage returns to break lines.

设计部模板

ProductType

string

No

The service type. Set the value to CloudDesktop.

Valid values:

  • CloudDesktop :

    Cloud computers

CloudDesktop

BizType

string

No

Note

This parameter is not publicly available.

Valid values:

  • 1 :

    The Enterprise edition.

1

SystemDiskSize

integer

No

The size of the system disk. Unit: GiB. Valid values: 40 to 500. Increments: 10 GiB.

Note

The system disk size must be at least as large as the configured image size.

80

SystemDiskPerformanceLevel

string

No

The performance level (PL) of the system disk.

Note

Only cloud computers of the Graphics or High Frequency type support Enterprise SSDs (ESSDs).

Valid values:

  • PL1 :

    A PL1 ESSD.

  • PL0 :

    A PL0 ESSD.

  • AutoPL :

    An AutoPL ESSD.

AutoPL

DataDiskList

array<object>

No

The data disks.

object

No

Size

integer

No

The size of the data disk. Unit: GiB. Valid values: 40 to 2040. Increments: 10 GiB.

Important

The larger the ESSD disk capacity, the higher the available PL (for example, PL2 is available for disks larger than 460 GiB). A higher PL comes with a higher cost. Select an ESSD based on your specific needs.

40

PerformanceLevel

string

No

The PL of the data disk. Default value: AutoPL.

AutoPL

ImageId

string

No

The ID of the cloud computer image. You can query image IDs on the Images page. System images and custom images are supported.

desktopimage-windows-server-2022-64-asp

DefaultLanguage

string

No

The default language of cloud computers during startup. This parameter takes effect only when cloud computers are created from system images.

zh-CN

PolicyGroupId

string

No

The ID of the policy group.

pg-8hlryfn331******

TimerGroupId

string

No

The ID of the scheduled task group.

ccg-0caoeogrk9m5****

ResourceGroupId

string

No

The ID of the resource group.

rg-4knxmfneq1e******

ResourceTagList

array<object>

No

The tags added to cloud computers. Specify tags in key-value pairs. You can specify up to 20 tags.

object

No

Key

string

No

The tag key.

department

Value

string

No

The tag value.

design

RegionConfigList

array<object>

No

The regions of the template. You can create cloud computers by using a template only within the same region as the template itself.

Note

You can specify up to 20 regions.

object

No

RegionId

string

No

The region ID. You can call the DescribeRegions operation to query the list of regions where Elastic Desktop Service (EDS) Enterprise is available.

cn-hangzhou

SnapshotPolicyId

string

No

The ID of the automatic snapshot policy.

sp-35fvn8m21pnx2****

ResourceInstanceType

string

No

The ID of the cloud computer type.

eds.enterprise_office.8c16g

VolumeEncryptionEnable

boolean

No

Specifies whether to enable disk encryption.

Valid values:

  • false :

    (Default) Disables disk encryption.

  • true :

    Enables disk encryption.

false

VolumeEncryptionKey

string

No

The ID of the Key Management Service (KMS) key that you want to use to encrypt disks. You can call the ListKeys operation to query KMS keys.

a7b3c0c8-b3a2-4876-b1cc-*********

OfficeSiteId

string

No

The office network ID.

cn-hangzhou+dir-709******

SubnetId

string

No

The subnet ID.

vsw-bp1yiu**********

SiteConfigList

array<object>

No

The site configurations.

object

No

SiteId

string

No

The site ID.

Valid values:

  • outside_mainland :

    Outside the Chinese mainland.

  • mainland :

    Chinese mainland.

mainland

AppRuleId

string

No

The application control policy ID.

bwr-5a5371e0db954d********

ChargeType

string

No

Period

integer

No

PeriodUnit

string

No

AutoPay

boolean

No

AutoRenew

boolean

No

UserDuration

integer

No

PostPaidAfterUsedUp

boolean

No

Response elements

Element

Type

Description

Example

object

The response elements.

Data

string

The template ID.

b-0cc7rx533*****

Success

boolean

Indicates whether the request was successful.

True

Code

string

The execution result of the operation. If the request was successful, success is returned. If the request failed, an error message is returned.

success

Message

string

The creation result.

success

HttpStatusCode

integer

The HTTP status code returned.

200

RequestId

string

The request ID.

791CC0D3-1A38-573B-8F5F-********

Examples

Success response

JSON format

{
  "Data": "b-0cc7rx533*****",
  "Success": true,
  "Code": "success",
  "Message": "success",
  "HttpStatusCode": 200,
  "RequestId": "791CC0D3-1A38-573B-8F5F-********"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.