Converts the instance billing method from pay-as-you-go to subscription.
Note: When you call this operation, make sure that the payType must be Postpaid.
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ConvertInstance | The operation that you want to perform. Set the value to ConvertInstance. |
| ClusterId | String | Yes | hb-bp16o0pd52e3y**** | The ID of the instance. |
| Duration | Integer | Yes | 7 | The subscription period.
|
| PayType | String | Yes | Prepaid | The billing method of the instance. Valid values: Prepaid: subscription Postpaid: pay-as-you-go |
| PricingCycle | String | Yes | month | The unit of the subscription duration.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| OrderId | Long | 54124548879 | The ID of the order. |
| RequestId | String | 50373857-C47B-4B64-9332-D0B5280B59EA | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ConvertInstance
&ClusterId=hb-bp16o0pd52e3y****
&Duration=7
&PayType=Prepaid
&PricingCycle=month
&<Common request parameters>
Sample success responses
XML format
<OrderId>54124542154</OrderId>
<RequestId>50373857-C47B-4B64-9332-D0B5280B59EA</RequestId>
JSON format
{
"OrderId":"54124542154",
"RequestId": "50373857-C47B-4B64-9332-D0B5280B59EA"
}
Error codes
For a list of error codes, see Service error codes.