CreateTemplate

更新时间:
复制 MD 格式

Creates a custom WUYING Workspace template. A WUYING Workspace template is a collection of WUYING Workspace configurations that simplifies and accelerates the creation of WUYING Workspaces.

Operation description

Note the following when you call this operation:

  • Most template parameters are optional. Alibaba Cloud does not validate the existence or validity of parameter values during template creation. The values are validated only when you use the template to create an instance.

  • If you create a WUYING Workspace in a region that is different from the region specified for a parameter in the template, that parameter setting is ignored.

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 name of the template. The name must meet the following requirements:

  • The name must be 2 to 126 characters in length.

  • The name must start with a letter or a Chinese character. It cannot start with http:// or https://.

  • The name can contain letters, digits, Chinese characters, colons (:), underscores (_), and hyphens (-). Periods (.) are not supported.

我的云电脑模板001

Description

string

No

The description of the template. The description must meet the following requirements:

  • The description must be 2 to 256 characters in length. It cannot start with http:// or https://.

  • The description can contain Chinese characters, letters, digits, spaces, and special characters. You can use carriage returns for line breaks.

设计部模板

ProductType

string

No

Product type. Set this parameter to CloudDesktop.

Valid values:

  • CloudDesktop :

    Cloud computer

CloudDesktop

BizType

string

No

Note

This parameter is not publicly available.

Valid values:

  • 1 :

    Enterprise Edition

1

SystemDiskSize

integer

No

The size of the system disk. Unit: GiB. Valid values: 40 to 500. The value must be a multiple of 10.

Note

The system disk size cannot be smaller than the size of the image.

80

SystemDiskPerformanceLevel

string

No

The performance level of the system disk.

Note

Only WUYING Workspace instances that have high-frequency CPUs or GPUs support Enhanced SSDs (ESSDs).

Valid values:

  • PL1 :

    ESSD PL1

  • PL0 :

    ESSD PL0

  • AutoPL :

    standard SSD (default)

AutoPL

DataDiskList

array<object>

No

The size and configuration of the data disk.

object

No

Size

integer

No

The size of the data disk. Unit: GiB. Valid values: 40 to 2040. The value must be a multiple of 10.

Important For an ESSD, a larger capacity provides a higher performance level. For example, you can select PL2 for a disk larger than 460 GiB. Higher performance levels result in higher costs. Select a performance level for the ESSD as needed.

40

PerformanceLevel

string

No

The performance level of the data disk. The default value is AutoPL.

AutoPL

ImageId

string

No

The ID of the WUYING Workspace image. You can find the image ID on the Image Management page. Operating system (OS) images and custom images are supported.

desktopimage-windows-server-2022-64-asp

DefaultLanguage

string

No

The default language of the OS. This parameter takes effect only when you create a WUYING Workspace from an OS image.

zh-CN

PolicyGroupId

string

No

The ID of the policy group.

pg-8hlryfn331******

TimerGroupId

string

No

The ID of the configuration group.

ccg-0caoeogrk9m5****

ResourceGroupId

string

No

The ID of the resource group.

rg-4knxmfneq1e******

ResourceTagList

array<object>

No

The tags of the WUYING Workspace. You can specify up to 20 tags. A tag is a key-value pair.

object

No

Key

string

No

The key of the tag.

department

Value

string

No

The value of the tag.

design

RegionConfigList

array<object>

No

The configurations of the template for specific regions. You can specify configurations for multiple regions. When you use the template to create a workspace, the configuration for the region where the workspace resides is used.

Note

You can specify configurations for up to 20 regions.

object

No

RegionId

string

No

The ID of the region. To obtain the regions that support WUYING Workspace, call the DescribeRegions operation.

cn-hangzhou

SnapshotPolicyId

string

No

The ID of the automatic snapshot policy.

sp-35fvn8m21pnx2****

ResourceInstanceType

string

No

The ID of the Elastic Desktop Service instance type.

eds.enterprise_office.8c16g

VolumeEncryptionEnable

boolean

No

Specifies whether to enable disk encryption.

Valid values:

  • false :

    Disk encryption is disabled. This is the default value.

  • true :

    Disk encryption is enabled.

false

VolumeEncryptionKey

string

No

The ID of the Key Management Service (KMS) key that is used for disk encryption. This parameter is required only if you set `VolumeEncryptionEnable` to `true`. You can call the ListKeys operation to obtain the key ID.

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

OfficeSiteId

string

No

The ID of the office network.

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

SubnetId

string

No

The ID of the vSwitch.

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

SiteConfigList

array<object>

No

Region configuration management

object

No

SiteId

string

No

The ID of the site.

Valid values:

  • outside_mainland :

    regions in Hong Kong, Macao, and Taiwan, and other regions outside the Chinese mainland

  • mainland :

    regions in the Chinese mainland

mainland

AppRuleId

string

No

The ID of the application control policy.

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

PlainResult<string>

Data

string

The ID of the template.

b-0cc7rx533*****

Success

boolean

Indicates whether the request was successful.

True

Code

string

The status code. A value of success indicates that the request was successful. Otherwise, an error code is returned.

success

Message

string

The result of the template creation operation.

success

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The ID of the request.

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.