Creates one or more cloud desktops.

Description

Before you create a cloud desktop, make sure that the following operations are performed:

  • You have created a workspace and a user. For more information, see the following topics:
  • You have created a desktop template by calling the CreateBundle operation, or you have confirmed to use an existing desktop template.
  • You have created a policy by calling the CreatePolicyGroup operation, or you have confirmed to use an existing policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDesktops

The operation that you want to perform. Set the value to CreateDesktops.

BundleId String Yes b-je9hani001wfn****

The ID of the desktop template.

EndUserId.N RepeatList Yes 123456789

The ID of user N who is authorized to use the cloud desktop. You can specify one or more user IDs. Valid values of N: 1 to 100.

Note Only one user can use the desktop at a time.
PolicyGroupId String Yes system-all-enabled-policy

The ID of the policy.

RegionId String Yes cn-hangzhou

The ID of the region.

OfficeSiteId String Yes cn-hangzhou+os-c5cy7q578s8jc****

The ID of the workspace.

ChargeType String No PrePaid

The billing method of the cloud desktop. Valid values:

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

Default value: PostPaid.

AutoPay Boolean No false

Specifies whether to enable automatic payment. Valid values:

  • true: enables automatic payment. Make sure that you have sufficient balance in your account. Otherwise, abnormal orders are generated.
  • false: generates the order with no payment made. You can log on to the EDS console and complete the payment based on the order ID on the Orders page.

Default value: true.

Period Integer No 1

The subscription period of the cloud desktop. The unit is specified by the PeriodUnit parameter. The Period parameter takes effect and is required only when the ChargeType parameter is set to PrePaid.

  • If the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, and 6.
  • If the PeriodUnit parameter is set to Year, the valid values of the Period parameter are 1, 2, 3, 4, and 5.
PeriodUnit String No Month

The unit of the subscription period. Valid values:

  • Month
  • Year

Default value: Month.

DesktopName String No testDesktopName

The name of the cloud desktop.

Amount Integer No 1

The number of cloud desktops to create. Valid values: 1 to 20.

Default value: 1.

Tag.N.Key String No TestKey

The key of tag N. Valid values of N: 1 to 20.

Tag.N.Value String No TestValue

The value of tag N. Valid values of N: 1 to 20.

AutoRenew Boolean No false

Specifies whether to enable auto-renewal for the cloud desktop. This parameter takes effect only when the ChargeType parameter is set to PrePaid.

Valid values:

  • true: enables automatic renewal. The renewal duration is the same as the duration that you specified at purchase.
  • false: disables auto-renewal.

Default value: false.

Response parameters

Parameter Type Example Description
DesktopId List ["ecd-gx2x1dhsmucyy****"]

The ID of the cloud desktop. A collection of cloud desktop IDs is returned. If multiple cloud desktops are created at a time, multiple cloud desktop IDs are returned.

OrderId String 123456789

The ID of the order. This parameter has a value only when the ChargeType parameter is set to PrePaid.

RequestId String 3EB7FCEE-D731-4948-85A3-4B2C341CA983

The ID of the request.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=CreateDesktops
&BundleId=b-je9hani001wfn****
&EndUserId.1=123456789
&PolicyGroupId=system-all-enabled-policy
&RegionId=cn-hangzhou
&OfficeSiteId=cn-hangzhou+os-c5cy7q578s8jc****
&<Common request parameters>

Sample success responses

XML format

<CreateDesktopsResponse> 
      <RequestId>3EB7FCEE-D731-4948-85A3-4B2C341CA983</RequestId>
      <DesktopId>ecd-gx2x1dhsmucyy****</DesktopId>
      <OrderId>123456789</OrderId>
</CreateDesktopsResponse>

JSON format

{
  "RequestId":"3EB7FCEE-D731-4948-85A3-4B2C341CA983",
  "DesktopId":["ecd-gx2x1dhsmucyy****"],
  "OrderId":"123456789"
}