All Products
Search
Document Center

Elastic Desktop Service:CreateDesktopGroup

Last Updated:Mar 28, 2025

Creates a shared group.

Operation description

  • To learn about the features, application scenarios, usage limits, scaling policies, and other details of shared groups, refer to Overview .
  • Before you call this operation, make sure that the required resources, such as the office network, cloud computer template, and policies, are created.

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:CreateDesktopGroupcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
BundleIdstringYes

The ID of the cloud computer template.

b-je9hani001wfn****
OfficeSiteIdstringYes

The ID of the office network.

cn-hangzhou+os-c5cy7q578s8jc****
PolicyGroupIdstringYes

The ID of the policy.

pg-9c2d6t2dwflqr****
DesktopGroupNamestringNo

The name of the shared group. The name can be up to 30 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). It must start with a letter but cannot start with http:// or https://.

desktopGroupName1
DirectoryIdstringNo

The ID of the directory.

Note This parameter is not publicly available.
hide
ScaleStrategyIdstringNo

The ID of the scaling policy.

Note This parameter is not publicly available.
hide
VpcIdstringNo

The ID of the virtual private cloud (VPC).

Note This parameter is not publicly available.
hide
DefaultInitDesktopCountintegerNo

The default number of cloud computers that you want to create at the same time in the shared group. Default value: 1.

1
KeepDurationlongNo

The duration for which each session remains active after disconnection. Valid values: 180000 (3 minutes) to 345600000 (4 days). Unit: milliseconds. If you set this parameter to 0, the session is permanently retained after disconnection.

When a session is disconnected, take note of the following items: 1. If the end user does not resume the session within the specified duration, the session will close, and all unsaved data will be cleared. 2. If the end user resumes the session within the specified duration, the session data will remain accessible for continued use.

6000
ChargeTypestringYes

The billing method of the shared group.

Valid values:

  • PostPaid: pay-as-you-go.
  • PrePaid: subscription.
PrePaid
PeriodintegerNo

The subscription duration of the shared group. This parameter is required if you set ChargeType to PrePaid. You must specify the subscription duration unit by using PeriodUnit.

  • If you set PeriodUnit to Month, valid values of this parameter:

    • 1
    • 2
    • 3
    • 6
  • If you set PeriodUnit to Year, valid values of this parameter:

    • 1
    • 2
    • 3
    • 4
    • 5
1
PeriodUnitstringNo

The unit of the subscription duration.

Month
OwnTypeintegerNo

The session type of the shared group.

Note This parameter is not publicly available.

Valid values:

  • 0: single-session.
  • 1: multi-session.
0
AutoPaybooleanNo

Specifies whether to automatically complete the payment for subscription orders.

true
CommentsstringNo

The remarks of the shared group.

test
MinDesktopsCountintegerNo

The minimum number of subscription cloud computers that can be automatically provisioned at the same time in the shared group. This parameter is required if you set ChargeType to PrePaid. Default value: 1. Valid values: 0 to MaxDesktopsCount.

1
MaxDesktopsCountintegerNo

The maximum number of pay-as-you-go cloud computers that can be automatically provisioned at the same time in the shared group. Valid values: 0 to 500.

50
AllowAutoSetupintegerNo

Specifies whether to enable batch-based automatic creation of subscription cloud computers for the shared group. This parameter is required if you set ChargeType to PrePaid.

Valid values:

  • 0: enables batch-based automatic creation of subscription cloud computers.
  • 1: disables batch-based automatic creation of subscription cloud computers.
1
AllowBufferCountintegerNo

The maximum number of pay-as-you-go cloud computers that can be reserved in the shared group. This parameter is required if you set ChargeType to PostPaid. Valid values:

  • 0: does not reserve any cloud computers.
  • N: reserves N cloud computers (1≤ N ≤ 100).
Note Setting this parameter to 0 means no cloud computers will be reserved in the shared group. In this case, the system must create, start, and assign cloud computers to end users upon request, which can be time-consuming. To improve user experience, we recommend that you reserve a specific number of cloud computers.
1
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

123e4567-e89b-12d3-a456-426655440000
EndUserIdsarrayNo

The IDs of the end users.

stringNo

The ID of the end user.

alice
ResetTypelongNo

The reset option of the shared group.

Valid values:

  • 0: Reset is not required.
  • 1: Only the system disk is reset.
  • 2: Only the data disk is reset.
  • 3: Both the system disk and the data disk are reset.
0
LoadPolicylongNo

The load balancing policy of the multi-session shared group.

Note This parameter is not publicly available.

Valid values:

  • 0: depth-first
  • 1: breadth first
0
BindAmountlongNo

The number of concurrent sessions of the multi-session shared group.

Note This parameter is not publicly available.
1
ClassifystringNo

The type of the cloud computers in the shared group.

Note This parameter is not publicly available.

Valid values:

  • teacher: cloud computers designed for teachers.
  • student: cloud computers designed for students.
teacher
AllClassifyUsersbooleanNo

The types of the users.

Note This parameter is not publicly available.
Alice
VolumeEncryptionEnabledbooleanNo

Specifies whether to enable disk encryption.

false
VolumeEncryptionKeystringNo

The ID of the Key Management Service (KMS) key that you want to use when disk encryption is enabled. You can call the ListKeys operation to obtain a list of KMS keys.

08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4****
RatioThresholdfloatNo

The threshold for the ratio of connected sessions. This parameter defines the condition that activates automatic scaling of cloud computers in a multi-session shared group. The ratio of connected sessions is calculated by using the following formula:

Ratio of connected sessions = Number of connected sessions/(Total number of cloud computers × Maximum number of sessions allowed for each cloud computer) × 100%.

If the connected session ratio exceeds the specified threshold, new cloud computers are provisioned. If the ratio falls below the threshold, idle cloud computers are deleted.

Note This parameter is not publicly available.
0.5
ConnectDurationlongNo

The maximum duration for which each session remains connected. The session is automatically disconnected once the specified maximum time limit is reached. Unit: milliseconds. Valid values: 900000 to 345600000. That is, the session can be connected for 15 to 5,760 minutes (4 days).

300000
IdleDisconnectDurationlongNo

The duration after which a session is terminated if no keyboard or mouse activity is detected. When an end user connects to a cloud computer, a session is initiated. If no input from the keyboard or mouse is detected within this specified timeframe, the session is automatically closed. Unit: milliseconds. Valid values: 360000 to 3600000 (6 minutes to 60 minutes)

The system prompts end users to save their data 30 seconds before a session is disconnected. To avoid data loss, end users must save their session data upon receiving the prompt.

Note This parameter is suitable only for cloud computers whose image version is v1.0.2 or later.
300000
StopDurationlongNo

The maximum period of inactivity allowed before a cloud computer is automatically stopped. If the idle duration reaches the specified limit, the system stops the cloud computer. When an end user reconnects to the stopped cloud computer, it automatically restarts. Unit: milliseconds.

300000
ProfileFollowSwitchbooleanNo

Specifies whether to enable user data roaming.

Note This parameter is not publicly available.
false
FileSystemIdstringNo

The ID of the File Storage NAS (NAS) file system for the user data roaming feature.

Note This parameter is not publicly available.
04f314****
BuyDesktopsCountintegerNo
  • For shared subscription groups, this parameter defines the initial number of cloud computers to be created. Valid values: 0 to 200.
  • For shared pay-as-you-go groups, this parameter defines the minimum initial number of cloud computers to be created. Valid values: 0 to MaxDesktopsCount. Default value: 1.
3
GroupVersionintegerNo

The version of the shared group.

2
AutoRenewbooleanNo

Specifies whether to enable auto-renewal for the shared subscription group.

Valid values:

  • true
  • false
false
Tagarray<object>No

The tags. You can specify up to 20 tags.

objectNo

The tag.

KeystringYes

The tag key. You cannot specify an empty string as a tag key. A tag key can be up to 128 characters in length and cannot start with acs: or aliyun. The tag key cannot contain http:// or https://.

TestKey
ValuestringYes

The tag value. You can specify an empty string as a tag key. A tag value can be up to 128 characters in length and cannot start with acs:. The tag value cannot contain http:// or https://.

TestValue
PromotionIdstringNo

The ID of the coupon.

youhuiquan_promotion_option_id_*****
ImageIdstringNo

The ID of the image.

m-gx2x1dhsmusr2****
SystemDiskCategorystringNo

The category of the system disk.

Valid values:

  • cloud_auto: the standard SSD.
  • cloud_essd: the Enterprise SSD (ESSD).
cloud_auto
SystemDiskSizeintegerNo

The size of the system disk. Unit: GiB.

Note The system disk must be at least as large as the image.
80
SystemDiskPerLevelstringNo

The performance level (PL) of the system disk of the ESSD category. Default value: PL0.

Valid values:

  • PL1
  • PL0
PL0
DataDiskCategorystringNo

The category of the data disk.

Valid values:

  • cloud_auto: the standard SSD.
  • cloud_essd: the ESSD.
cloud_auto
DataDiskSizeintegerNo

The size of the data disk. Unit: GB. Valid values: 0 to 16380. The value must be an integral multiple of 20.

  • A value of 0 means no data disk is attached.
  • If the selected plan includes a standard SSD, the data disk size must be at least 20 GB.

Default value: 0.

80
DataDiskPerLevelstringNo

The PL of the data disk of the ESSD category. Default value: PL0.

Valid values:

  • PL1
  • PL0
PL0
DefaultLanguagestringNo

The language of the OS.

Valid values:

  • en-US: English.
  • zh-HK: Traditional Chinese.
  • zh-CN: Simplified Chinese
  • ja-JP: Japanese.
zh-CN
DesktopTypestringNo

The specifications of the cloud computer. You can call the DescribeDesktopTypes operation to query all the supported specifications.

eds.enterprise_office.16c64g
HostnamestringNo

The hostname series of the cloud computer. This parameter is supported exclusively when the office network operates on Active Directory (AD) and the cloud computer runs on a Windows operating system.

Naming conventions:

  • A hostname must be 2 to 15 characters in length
  • and can contain only letters, digits, and hyphens (-). It cannot start or end with a hyphen (-), contain consecutive hyphens (-), or contain only digits.

If you want to create multiple cloud computers, specify their hostnames in the name_prefix[begin_number,bits]name_suffix format. For example, if you set Hostname to ecd-[1,4]-test, the hostnames of the cloud computers will be assigned sequentially as ecd-0001-test, ecd-0002-test, and so on.

  • name_prefix: the prefix of the hostname.
  • [begin_number,bits]: the sequential number in the hostname. The begin_number value is the starting number. Valid values of begin_number: 0 to 999999. Default value: 0. The bits value is the number of digits. Valid values: 1 to 6. Default value: 6.
  • name_suffix: the suffix of the hostname.
testhost
MultiResourcebooleanNo

Specifies whether the shared group is a multi-cloud computer type.

Valid values:

  • true: a multi-cloud computer type.
  • false: a single-cloud computer type.
false
ExclusiveTypestringNo

Specifies whether the shared group is exclusive. You must set this parameter to Exclusive when SessionType is set to MultipleSession.

Exclusive
GroupAmountintegerNo

The number of shared groups for the single-cloud computer type. You must specify this parameter if you set MultiResource to false. Valid values: 1 to 5. Default value: 1.

1
SessionTypestringNo

The type of the session.

Valid values:

  • SingleSession
  • MultipleSession
SingleSession
TimerGroupIdstringNo

The ID of the timer group.

ccg-0caoeogrk9m5****
SnapshotPolicyIdstringNo

The ID of the automatic snapshot policy.

sp-28mp6my0l6zow****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

DesktopGroupIdstring

The ID of the shared group.

dg-2i8qxpv6t1a03****
RequestIdstring

The ID of the request.

3EB7FCEE-D731-4948-85A3-4B2C341CA983
OrderIdsarray

The IDs of the orders.

OrderIdstring

The ID of the order. This parameter is returned only if you set ChargeType to PrePaid.

123456789
DesktopGroupIdsarray

The IDs of the shared groups.

DesktopGroupIdstring

The ID of the shared group.

['dg-1np2yupx0uim****']

Examples

Sample success responses

JSONformat

{
  "DesktopGroupId": "dg-2i8qxpv6t1a03****",
  "RequestId": "3EB7FCEE-D731-4948-85A3-4B2C341CA983",
  "OrderIds": [
    "123456789"
  ],
  "DesktopGroupIds": [
    "['dg-1np2yupx0uim****']"
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2025-03-24The request parameters of the API has changedView Change Details
2025-01-24The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-08-09The request parameters of the API has changedView Change Details
2024-06-14The request parameters of the API has changedView Change Details
2023-09-05The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-03-28The request parameters of the API has changedView Change Details
2022-08-24The internal configuration of the API is changed, but the call is not affectedView Change Details