Creates a custom desktop template.

Description

Desktop templates are categorized into system templates and custom templates. System templates are the templates provided by Alibaba Cloud. You can call this operation to create a custom template.

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 CreateBundle

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

RegionId String Yes cn-hangzhou

The ID of the region.

ImageId String Yes m-4zfb6zj728hhr****

The ID of the image.

DesktopType String Yes ecd.basic.large

The type of the cloud desktop. You can call the DescribeBundles operation to query the cloud desktop templates and obtain the supported desktop type from the value of the DesktopType parameter.

Note You can select GPU-accelerated desktop types only when you use GPU-accelerated images.
RootDiskSizeGib Integer Yes 80

The size of the system disk. Unit: GiB.

The value of this parameter must be consistent with the system disk size supported by the cloud desktop type. For more information, see Cloud desktop types.

BundleName String No testBundleName

The name of the desktop template.

Description String No test

The description of the desktop template.

Language String No zh-CN

The language of the OS. This parameter is available only for system images. Valid values:

  • zh-CN: Simplified Chinese
  • zh-HK: Traditional Chinese (Hong Kong)
  • en-US: English
  • ja-JP: Japanese
RootDiskPerformanceLevel String No PL1

The performance level (PL) of the system disk. If the cloud desktop type is Graphics or High Frequency, you can set the PL of the system disk. Valid values:

  • PL0
  • PL1
  • PL2
  • PL3

For more information about the differences between disks at different PLs, see Enhanced SSDs.

UserDiskPerformanceLevel String No PL1

The PL of the data disk. If the cloud desktop type is Graphics or High Frequency, you can set the PL of the data disk. Valid values:

  • PL0
  • PL1
  • PL2
  • PL3

For more information about the differences between disks at different PLs, see Enhanced SSDs.

UserDiskSizeGib.N Integer Yes 70

The size of data disk N. You can configure only one data disk. Unit: GiB.

The value of this parameter must be consistent with the data disk size supported by the cloud desktop type. For more information, see Cloud desktop types.

Note The value of the UserDiskSizeGib parameter in the template must be greater than that of the DataDiskSize parameter in the image.

Response parameters

Parameter Type Example Description
BundleId String b-cezrnfgecbich****

The ID of the desktop template.

RequestId String A90B77D3-261E-4AB2-A860-2FA2098D****

The ID of the request.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=CreateBundle
&ImageId=m-4zfb6zj728hhr****
&DesktopType=ecd.basic.large
&RootDiskSizeGib=80
&UserDiskSizeGib.1=70
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<BundleIdResponse>
<BundleId>b-cezrnfgecbich****</BundleId>
<RequestId>A90B77D3-261E-4AB2-A860-2FA2098D****</RequestId>
</BundleIdResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "BundleIdResponse" : {
    "BundleId" : "b-cezrnfgecbich****",
    "RequestId" : "A90B77D3-261E-4AB2-A860-2FA2098D****"
  }
}