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

RDS for PostgreSQL

Copy page
Download PDF
Managing instances
ModifyDBInstanceChargeType
Copy page
Download PDF
ModifyDBInstanceChargeType
Call the ModifyDBInstanceChargeType API to modify the billing type 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​
Required?​
Example​
Description​
InstanceId​
String​
Yes​
postgres-21a3333b****​
Instance ID.​
ChargeType​
String​
Yes​
PrePaid​
Billing method. The value is PrePaid (subscription).​
tip​
Only pay-as-you-go instances can be converted to subscription instances.​
AutoRenew​
Boolean​
No​
true​
Is automatic renewal enabled for the prepaid scenario?​
  • true: automatic renewal.​
  • false: no automatic renewal (Default value).​
PeriodUnit​
String​
No​
Month​
Purchase period for prepaid scenarios.​
  • Month: monthly (default).​
  • Year: subscription.​
Period​
Integer​
No​
1​
Subscription duration in a prepaid scenario. default value: 1. Range:​
  • When PeriodUnit is Month, Period ranges from 1 to 9.​
  • When PeriodUnit is Year, Period ranges from 1 to 3.​
​
Response parameter​
​
Parameter​
Type​
Example​
Description​
InstanceId​
String​
postgres-21a3333b****​
Instance ID.​
OrderNO​
String​
Order709899242175681****​
Order ID.​
​
Sample​
Sample request​
​
POST /?Action=ModifyDBInstanceChargeType&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-ca7b7019****",​
"ChargeType": "PrePaid",​
"PeriodUnit": "Month",​
"AutoRenew": false​
}​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "20230802104119518A5717C82679D86E18",​
"Action": "ModifyDBInstanceChargeType",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "postgres-ca7b7019****",​
"OrderNO": "Order726254891288237****"​
}​
}​
​
Last updated: 2026.03.31 10:45:18