All Products
Search
Document Center

Elastic Desktop Service:CreateTemplate

Last Updated:Nov 14, 2025

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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecd:CreateTemplatecreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TemplateNamestringYes

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.
DescriptionstringNo

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.
ProductTypestringNo

The service type. Set the value to CloudDesktop.

CloudDesktop
BizTypestringNo
Note This parameter is not publicly available.

Valid values:

  • 1: the Enterprise edition.
1
SystemDiskSizeintegerNo

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
SystemDiskPerformanceLevelstringNo

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
DataDiskListarray<object>No

The data disks.

objectNo
SizeintegerNo

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

**

Keep in mind that 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
PerformanceLevelstringNo

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

AutoPL
ImageIdstringNo

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
DefaultLanguagestringNo

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

zh-CN
PolicyGroupIdstringNo

The ID of the policy group.

pg-8hlryfn331******
TimerGroupIdstringNo

The ID of the scheduled task group.

ccg-0caoeogrk9m5****
ResourceGroupIdstringNo

The ID of the resource group.

rg-4knxmfneq1e******
ResourceTagListarray<object>No

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

objectNo
KeystringNo

The tag key.

department
ValuestringNo

The tag value.

design
RegionConfigListarray<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.
objectNo
RegionIdstringNo

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
SnapshotPolicyIdstringNo

The ID of the automatic snapshot policy.

sp-35fvn8m21pnx2****
ResourceInstanceTypestringNo

The ID of the cloud computer type.

eds.enterprise_office.8c16g
VolumeEncryptionEnablebooleanNo

Specifies whether to enable disk encryption.

Valid values:

  • false (default): disables disk encryption.
  • true: enables disk encryption.
false
VolumeEncryptionKeystringNo

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-*********
OfficeSiteIdstringNo

The office network ID.

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

The subnet ID.

vsw-bp1yiu**********
SiteConfigListarray<object>No

区域配置管理

objectNo
SiteIdstringNo

站点 ID。

Enumeration Value:
  • outside_mainland: 港澳台和海外.
  • mainland: 中国内地(大陆).
mainland
AppRuleIdstringNo

应用管控策略 ID

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

Response parameters

ParameterTypeDescriptionExample
object

PlainResult

Datastring

The template ID.

b-0cc7rx533*****
Successboolean

Indicates whether the request was successful.

True
Codestring

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

success
Messagestring

The creation result.

success
HttpStatusCodeinteger

The HTTP status code returned.

200
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.