Changes the billing method of a cloud desktop to subscription or pay-as-you-go.
Operation description
Before calling this operation, ensure you understand the billing methods for cloud desktops. For more information, see billing overview.
Ensure the cloud desktop is in the running or stopped state and has no overdue payments.
After you pay for the order, the system begins to convert the billing method. While the desktop is in the updating state, you cannot perform other operations, such as starting, stopping, or changing its configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:ModifyDesktopChargeType |
update |
*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 supported by Elastic Desktop Service. |
cn-hangzhou |
| ChargeType |
string |
No |
The new billing method. Valid values:
|
PrePaid |
| Period |
integer |
No |
The subscription duration. This parameter is required only when you set 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 |
| DesktopId |
array |
Yes |
The IDs of the cloud desktops. You can specify 1 to 20 IDs. |
ecd-gx2x1dhsmucyy**** |
|
string |
No |
The ID of the cloud desktop. |
["ecd-gx2x1dhsmucyy****"] |
|
| PromotionId |
string |
No |
The promotion ID. |
50003836003**** |
| UseDuration |
integer |
No |
Note
This parameter is in invitational preview and is not publicly available. |
sample |
| ResellerOwnerUid |
integer |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| OrderId |
string |
The ID of the order. |
123456789 |
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| DesktopId |
array |
The IDs of the cloud desktops. |
|
|
string |
The ID of the cloud desktop. |
["ecd-gx2x1dhsmucyy****"] |
|
| TaskId |
string |
Examples
Success response
JSON format
{
"OrderId": "123456789",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"DesktopId": [
"[\"ecd-gx2x1dhsmucyy****\"]"
],
"TaskId": ""
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.