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
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ecd:CreateTemplate | create | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| TemplateName | string | Yes | The template name. It must meet the following criteria:
| |
| Description | string | No | The template description. It must meet the following criteria:
| |
| ProductType | string | No | The service type. Set the value to | CloudDesktop |
| BizType | string | No | Note
This parameter is not publicly available.
Valid values:
| 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:
| 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. ** 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 |
| PerformanceLevel | string | No | The PL of the data disk. Default value: | 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 |
| 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 | 区域配置管理 | |
| object | No | |||
| SiteId | string | No | 站点 ID。 Enumeration Value:
| mainland |
| AppRuleId | string | No | 应用管控策略 ID | bwr-5a5371e0db954d******** |
Response parameters
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.
