You need to enable JavaScript to run this app.
RDS for MySQL

RDS for MySQL

Copy page
Download PDF
Managing instances
ModifyDBInstanceChargeType
Copy page
Download PDF
ModifyDBInstanceChargeType
Call the ModifyDBInstanceChargeType API to modify the billing method of an instance.​
Request type​
Asynchronous request.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
​
Parameter​
Type​
Is it required?​
Sample value​
Description​
InstanceId​
String​
Yes​
mysql-538e563b****,mysql-2122c54c****​
Instance ID. You can enter up to 20 instance IDs. Separate the IDs with a comma (,).​
ChargeType​
String​
Yes​
PrePaid​
Billing method. Values are:​
  • PrePaid: subscription.​
  • PostPaid: pay-as-you-go.​
AutoRenew​
Boolean​
No​
false​
Is automatic renewal enabled for the prepaid scenario? Values:​
  • yes: automatic renewal.​
  • false: no automatic renewal.​
tip​
Required when ChargeType is PrePaid.​
PeriodUnit​
String​
No​
Month​
Purchase period for prepaid scenarios.​
  • Month: The purchase cycle is by month. Default.​
  • Year: the purchase cycle is by year.​
tip​
Required when ChargeType is PrePaid.​
Period​
Integer​
No​
1​
Subscription duration in a prepaid scenario.​
tip​
Required when ChargeType is PrePaid.​
​
Response parameters​
​
Parameter​
Type​
Sample value​
Description​
InstanceId​
String​
mysql-7e662621****​
Instance ID.​
OrderNO​
String​
Order7098992421756812175​
Order ID.​
​
Sample​
Sample request​
​
POST /?Action=ModifyDBInstanceChargeType&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-mysql.cn-beijing.volcengineapi.com​
X-Date: 20211202T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "mysql-538e563b****,mysql-2122c54c****",​
"ChargeType": "PrePaid",​
"AutoRenew": false,​
"PeriodUnit": "Month",​
"Period": 1​
}​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "202307041643413D011E46886A48732386",​
"Action": "ModifyDBInstanceChargeType",​
"Version": "2022-01-01",​
"Service": "rds_mysql",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "mysql-538e563b****,mysql-2122c54c****",​
"OrderNO": "Order7343129081879630116"​
}​
}​
​
Error code​
For more details, refer to Error codes.​
Last updated: 2026.06.12 17:17:49