Creates a custom cloud computer template.
Operation description
Cloud computer templates include system templates and custom templates. A system template is the default template provided by Alibaba Cloud. You can call this operation to create a custom template.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ecd:CreateBundle | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ImageId | string | Yes | The ID of the image. | m-4zfb6zj728hhr**** |
DesktopType | string | Yes | The instance type of the cloud computers. You can call the DescribeBundles operation to query cloud computer templates and obtain the instance types supported by the cloud computers from the Note
If you want the template to use a non-GPU-accelerated image, you can only select a non-GPU-accelerated instance type. If you want the template to use a GPU-accelerated image, you can only select a GPU-accelerated instance type.
| ecd.basic.large |
RootDiskSizeGib | integer | Yes | 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 computer instance type. For more information, see Overview . | 80 |
BundleName | string | No | The name of the cloud computer template. | testBundleName |
Description | string | No | The description of the cloud computer template. | test |
Language | string | No | The OS language. This parameter is available only for system images. Valid values:
| zh-CN |
UserDiskSizeGib | array | Yes | The data disk sizes. You can configure only one data disk. | |
integer | Yes | The data disk size. 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 computer instance type. For more information, see Overview . Note
The value of the UserDiskSizeGib parameter in the template must be greater than the value of the DataDiskSize parameter in the image.
| 70 | |
RootDiskPerformanceLevel | string | No | The performance level (PL) of the system disk. When the cloud computer instance type that is specified by the DesktopType parameter is set to a graphical instance type or instance type with a high clock speed, you can set the performance level of the disks. For more information about the differences among disks at different PLs, see Enhanced SSDs. Valid values:
| PL1 |
UserDiskPerformanceLevel | string | No | The PL of the data disk. When the cloud computer instance type that is specified by the DesktopType parameter is set to a graphical instance type or instance type with a high clock speed, you can set the performance level of the disks. For more information about the differences among disks at different PLs, see Enhanced SSDs. Valid values:
| PL1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"BundleId": "b-cezrnfgecbich****",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2021-10-28 | The request parameters of the API has changed | View Change Details |
2021-08-05 | Add Operation | View Change Details |