All Products
Search
Document Center

WUYING Workspace:ModifyDesktopChargeType

Last Updated:Apr 08, 2024

Changes the billing method of cloud computers to subscription or pay-as-you-go.

Operation description

  • Before you call this operation, make sure that you fully understand the billing methods of cloud computers. For more information, see Billing overview.
  • Before you call this operation, make sure that the cloud computers whose billing method you want to change are in the Running or Stopped state and you have no overdue payments in your Alibaba Cloud account.
  • After the order payment is completed, the system starts to change the billing method of the cloud computers. During the change, you cannot perform operations, such as starting or stopping the cloud computers, and changing configurations of the cloud computers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ChargeTypestringNo

The new billing method that you want to apply.

Valid values:

  • PostPaid: changes the billing method from subscription to pay-as-you-go.

  • PrePaid: changes the billing method from pay-as-you-go to subscription.

PrePaid
PeriodintegerNo

The subscription duration of the cloud computers if you set the ChargeType parameter to PrePaid. The unit is specified by the PeriodUnit parameter. This parameter is valid only when the ChargeType parameter is set to PrePaid. In this case, you must specify this parameter.

  • If the PeriodUnit parameter is set to Week, set the Period parameter to 1.
  • 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.
1
PeriodUnitstringNo

The unit of the subscription duration if you specify subscription as the new billing method for the cloud desktop.

Month
AutoPaybooleanNo

Specifies whether to enable automatic payment if you specify subscription as the new billing method for the cloud desktop.

false
DesktopIdarrayYes

The IDs of the cloud computers. You can specify 1 to 20 IDs.

stringYes

The ID of a cloud computer.

["ecd-gx2x1dhsmucyy****"]
PromotionIdstringNo

The ID of the promotional activity.

500038360030606
UseDurationintegerNo
Note This parameter is in invitational preview and not publicly available.
internal only

Response parameters

ParameterTypeDescriptionExample
object

Schema of response.

OrderIdstring

The ID of the order.

123456789
RequestIdstring

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****
DesktopIdarray

The IDs of the cloud computers.

string

The ID of the cloud computer.

["ecd-gx2x1dhsmucyy****"]

Examples

Sample success responses

JSONformat

{
  "OrderId": "123456789",
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "DesktopId": [
    "[\"ecd-gx2x1dhsmucyy****\"]"
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-19The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: UseDuration
2021-09-27Add Operationsee changesets
2021-09-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: PromotionId