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.

  • If the PricingCycle parameter is set to year, the value range is 1 to 3.
  • If the PricingCycle parameter is set to month, the value range is 1 to 9.
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.

  • year: The unit of the subscription duration is year.
  • month: The unit of the subscription duration is month.

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.