Creates one or more cloud computers. You can assign the cloud computers to users during creation.
Operation description
Before you create a cloud computer, complete the following preparations:
- Create an office network (formerly known as a workspace) and users. For more information, see the following API operations and documents:
Simple office network: CreateSimpleOfficeSite and CreateUsers.
Active Directory (AD) office network: CreateADConnectorOfficeSite and Create an AD user.
Call the CreateBundle operation to create a cloud computer template, or use an existing one.
Call the CreatePolicyGroup operation to create a policy, or use an existing one.
To have the cloud computer automatically run a custom command script, use the UserCommands parameter to configure the custom command.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:CreateDesktops |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call the DescribeRegions operation to query the regions that WUYING Workspace supports. |
cn-hangzhou |
| GroupId |
string |
No |
The cloud computer pool ID. |
dg-boyczi8enfyc5**** |
| BundleId |
string |
No |
The cloud computer template ID. |
b-je9hani001wfn**** |
| DesktopName |
string |
No |
The name of the cloud computer. The name must meet the following requirements:
|
DemoComputer01 |
| UserName |
string |
No |
Note
This parameter is not available. |
username |
| VpcId |
string |
No |
Note
This parameter is not available. |
vpc-uf6w8u60n8xbkg5el**** |
| Amount |
integer |
No |
The number of cloud computers to create. Valid values: 1 to 300. Default value: 1. |
1 |
| DirectoryId |
string |
No |
Note
This parameter is not available. |
cn-hangzhou+dir-300943**** |
| OfficeSiteId |
string |
No |
The office network ID. |
cn-hangzhou+dir-387822**** |
| PolicyGroupId |
string |
No |
The policy ID. |
system-all-enabled-policy |
| ChargeType |
string |
No |
The billing method of the cloud computer. Valid values:
|
PrePaid |
| Period |
integer |
No |
The subscription duration. The unit of the duration is specified by the
|
1 |
| PeriodUnit |
string |
No |
The unit of the subscription duration. Valid values:
|
Month |
| AutoPay |
boolean |
No |
Specifies whether to enable automatic payment. Valid values:
|
false |
| AutoRenew |
boolean |
No |
Specifies whether to enable auto-renewal. This parameter takes effect only when you set the Valid values:
|
false |
| PromotionId |
string |
No |
The promotion ID. |
23141 |
| UserAssignMode |
string |
No |
The user assignment mode for the cloud computers. Note
If you do not set the Valid values:
|
ALL |
| Hostname |
string |
No |
The custom hostname of the cloud computer. This parameter is available only for cloud computers in an AD office network. The operating system of the cloud computers must be Windows. The hostname must meet the following requirements:
When you create multiple cloud computers, you can use the
|
testhost |
| EndUserId |
array |
No |
The list of authorized user IDs. You can specify 1 to 100 user IDs. |
123456789 |
|
string |
No |
The ID of the authorized user.
|
alice |
|
| Tag |
array<object> |
No |
The tags. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key. You can specify 1 to 20 tag keys. |
TestKey |
| Value |
string |
No |
The tag value. You can specify 1 to 20 tag values. |
TestValue |
| DesktopNameSuffix |
boolean |
No |
Specifies whether to automatically add a suffix to the cloud computer name when you create multiple cloud computers. Valid values:
|
false |
| VolumeEncryptionEnabled |
boolean |
No |
Specifies whether to enable disk encryption. Valid values:
|
false |
| VolumeEncryptionKey |
string |
No |
The ID of the Key Management Service (KMS) key to use when disk encryption is enabled. You can call the ListKeys operation to obtain the key ID. |
08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4**** |
| DesktopMemberIp |
string |
No |
The private IP address of the cloud computer. |
10.0.0.1 |
| UserCommands |
array<object> |
No |
The custom command data. |
|
|
object |
No |
The custom command data. |
||
| ContentEncoding |
string |
No |
The encoding mode of the command content (Content). Valid values:
|
Base64 |
| Content |
string |
No |
The command content. |
bmV3LWl0ZW0gZDpcdGVzdF91c2VyX2NvbW1hbmRzLnR4dCAtdHlwZSBm**** |
| ContentType |
string |
No |
The language type of the command. Valid values:
|
RunPowerShellScript |
| BundleModels |
array<object> |
No |
The list of cloud computer templates. |
|
|
object |
No |
The cloud computer template. |
||
| BundleId |
string |
No |
The cloud computer template ID. |
b-je9hani001wfn**** |
| Amount |
integer |
No |
The number of cloud computers to create. Valid values: 1 to 300. Default value: 0. |
1 |
| EndUserIds |
array |
No |
The list of users to whom to assign the cloud computers. |
|
|
string |
No |
The username. |
alice |
|
| DesktopName |
string |
No |
The name of the cloud computer. The name must meet the following requirements:
|
DemoComputer02 |
| Hostname |
string |
No |
The custom hostname of the cloud computer. This parameter is available only for cloud computers in an AD office network. The operating system of the cloud computers must be Windows. The hostname must meet the following requirements:
When you create multiple cloud computers, you can use the
|
testhost |
| VolumeEncryptionEnabled |
boolean |
No |
Specifies whether to enable disk encryption. |
false |
| VolumeEncryptionKey |
string |
No |
The ID of the KMS key to use when disk encryption is enabled. You can call the ListKeys operation to obtain the key ID. |
08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4**** |
| DesktopTimers |
array<object> |
No |
The details of the scheduled tasks for the cloud computer. This parameter is being deprecated. We recommend that you use the TimerGroupId parameter. |
|
|
object |
No |
The details of the scheduled tasks for the cloud computer. |
||
| TimerType |
string |
No |
The type of the scheduled task. |
NoOperationReboot |
| CronExpression |
string |
No |
The cron expression for the scheduled task. Important The time must be in Coordinated Universal Time (UTC). For example, to specify 00:00 (UTC+8) every day, set the value to 0 0 16 ? * 1,2,3,4,5,6,7. |
0 40 7 ? * 1,2,3,4,5,6,7 |
| Interval |
integer |
No |
The interval in minutes. |
10 |
| Enforce |
boolean |
No |
Specifies whether to forcefully execute the task. Valid values:
|
true |
| ResetType |
string |
No |
The reset type of the cloud computer. Valid values:
|
RESET_TYPE_SYSTEM |
| OperationType |
string |
No |
The operation type for the scheduled task. This parameter is supported only for disconnection-triggered tasks. Valid values:
|
Shutdown |
| AllowClientSetting |
boolean |
No |
Specifies whether to allow end users to configure the scheduled task. |
true |
| SubnetId |
string |
No |
The subnet ID. |
vsw-bp1m***** |
| MonthDesktopSetting |
object |
No |
Note
This parameter is not available. |
|
| UseDuration |
integer |
No |
Note
This parameter is not available. |
null |
| BuyerId |
integer |
No |
Note
This parameter is not available. |
null |
| DesktopId |
string |
No |
Note
This parameter is not available. |
null |
| SnapshotPolicyId |
string |
No |
The ID of the WUYING Workspace automatic snapshot policy. |
sp-28mp6my0l6zow**** |
| ResourceGroupId |
string |
No |
The ID of the WUYING Workspace resource group. |
rg-3mtuc28rx95lx**** |
| DesktopAttachment |
object |
No |
The parameters for creating a cloud computer without a template. This parameter is invalid if you specify the BundleId parameter. |
|
| ImageId |
string |
No |
The image ID. |
m-39ddhdb0ggzjx***** |
| SystemDiskCategory |
string |
No |
The type of the system disk. The system disk and data disk must be of the same type. Valid values:
|
cloud_auto |
| SystemDiskSize |
integer |
No |
The capacity of the system disk. Valid values: 60 to 500. Unit: GiB. The step size is 10 GiB. |
40 |
| SystemDiskPerLevel |
string |
No |
The performance level (PL) of the ESSD. This parameter is required if you set the disk type to ESSD. Valid values:
|
PL0 |
| DataDiskSize |
integer |
No |
The capacity of the data disk. Valid values: 40 to 2040. Unit: GiB. The step size is 10 GiB. |
40 |
| DataDiskCategory |
string |
No |
The type of the data disk. The system disk and data disk must be of the same type. Valid values:
|
cloud_auto |
| DataDiskPerLevel |
string |
No |
The PL of the ESSD. This parameter is required if you set the disk type to ESSD. Valid values:
|
PL0 |
| DefaultLanguage |
string |
No |
The language. Valid values:
|
zh-CN |
| DesktopType |
string |
No |
The instance type of the cloud computer. You can call the DescribeDesktopTypes operation to query the supported instance types. |
eds.enterprise_office.8c16g |
| TimerGroupId |
string |
No |
The ID of the scheduled task group. |
ccg-0caoeogrk9m5**** |
| SavingPlanId |
string |
No |
Note
This parameter is not available. |
spn-26c1b7bcrjcI**** |
| ResellerOwnerUid |
integer |
No |
||
| ExtendInfo |
string |
No |
The extended information in the JSON string format. This parameter is available only to internal customers. |
{} |
| AppRuleId |
string |
No |
||
| QosRuleId |
string |
No |
||
| ChannelCookie |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| OrderId |
string |
The order ID. This parameter is returned only when you set the Note
This parameter is returned when the request parameter `ChargeType` is set to `PrePaid`. |
123456789 |
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| DesktopId |
array |
The IDs of the cloud computers. If you create multiple cloud computers in a single call, multiple IDs are returned. |
|
|
string |
The cloud computer ID. |
["ecd-gx2x1dhsmucyy****"] |
Examples
Success response
JSON format
{
"OrderId": "123456789",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"DesktopId": [
"[\"ecd-gx2x1dhsmucyy****\"]"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidEncryptionKey.Missing | Parameter VolumeEncryptionKey is missing. | When the disk encryption function is enabled, the encryption key cannot be empty. |
| 400 | InvalidEncryptionKey.NotAuthorized | Eds service cannot access the given VolumeEncryptionKey. | Unable to access unauthorized encryption keys |
| 400 | InvalidEncryptionKey.NotFound | The specified VolumeEncryptionKey is not found. | The specified encryption key could not be found |
| 400 | InvalidImageStatus.NotValid | The specified image status is not valid. | The status of the specified image is unavailable and cannot be created. |
| 400 | InvalidImageVersion.NotSupported | The specified image version is no longer supported. | The specified image version is no longer supported. Please select another image. |
| 400 | InvalidMemberIp.DesktopAmount | The desktop amount need to be 1. | When you specify an IP to create a desktop, the number of desktops can only be 1 |
| 400 | InvalidPolicyGroup.Status | The target policy group is being created. Please try again later. | |
| 400 | Protocol.NotAllowed | Procotol of the image is not allowed. | The protocol type of the image is not supported. Check the image ID. |
| 400 | ExistedHostname | The specified hostname is existed on the domain. | The specified hostname already exists in the current workspace |
| 400 | HostnameCannotCustomizeForLinux | Customizing hostname is not supported for Linux desktop. | The custom hostname feature does not support Linux desktops |
| 400 | IncorrectDirectoryStatus | Only registered directory can create desktop. | Workspace status error, only desktop creation with registered workspace is supported |
| 400 | IncorrectDirectoryType | The protocol type of directory and desktop do not match. | The protocol types of the specified workspace and the target desktop do not match, please check |
| 400 | InvalidAmount | The specified Amount is not a valid value. | The specified quantity is illegal |
| 400 | InvalidAmount.NotTimesOfUsers | The specified Amount is notmatch EndUserId size. | The number of desktops specified is not equal to the number of users to be assigned, please re-specify |
| 400 | InvalidDesktopBundle.NotFound | The specified param BundleId is not found. | Specified BundleId not found |
| 400 | InvalidDirectoryId.NotFound | The specified param DirectoryId is not found. | Unable to find workspace ID, please check workspace |
| 400 | InvalidDirectoryType.NotSupported | The specified DirectoryType is not supported. | Specified |
| 400 | InvalidEncryptionEnabled.Invalid | The parameter VolumeEncryptionEnabled is invalid. | When specifying the encryption key, you need to turn on the disk encryption function. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.