Modifies the billing method. Currently, this operation only allows you to change the billing method from pay-as-you-go to subscription.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1Request parameters
Parameter | Type | Required | Description | Example |
| InstanceGroupIds | array | Yes | The instance group IDs. | |
string | No | The instance group ID. | ag-25nt4kk9whhdh**** | |
ChargeType | string | Yes | The new billing method for the instance groups. Note You can only change the billing method from pay-as-you-go to subscription. Valid values:
| PrePaid |
Period | integer | No | The subscription duration. The PeriodUnit parameter specifies the unit. Valid subscription durations are 1, 2, 3, and 6 months, and 1 year. | 1 |
PeriodUnit | string | No | The unit for the subscription duration. Valid values:
| Month |
AutoPay | boolean | No | Specifies whether to enable auto-payment. The default value is | false |
AutoRenew | boolean | No | Specifies whether to enable auto-renewal. The default value is | false |
PromotionId | string | No | The promotion or coupon ID. |
Response elements
Element | Type | Description | Example |
object | The response parameters. | ||
RequestId | string | The request ID. | 1A923337-44D9-5CAD-9A53-95084BD4**** |
| InstanceGroupIds | array | The instance group IDs. | |
string | The instance group ID. | ag-cuv4scs4obxch**** | |
OrderId | string | The order ID. | 22326560487**** |
Examples
Success response
JSON format
{
"RequestId": "1A923337-44D9-5CAD-9A53-95084BD4****",
"InstanceGroupIds": [
"ag-cuv4scs4obxch****"
],
"OrderId": "22326560487****"
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.