Changing the Billing Mode from Pay-per-Use to Yearly/Monthly
Function
This API is used to change the billing mode of an RDS instance from pay-per-use to yearly/monthly.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
This API is available only for RDS for PostgreSQL instances.
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
Constraints
N/A
Range
You can obtain the value of this parameter from the id field in Table 4.
Default Value
N/A
Request
- Parameter description
Table 2 Parameters Parameter
Mandatory
Type
Description
period_type
Yes
String
Definition
The unit of time.
Constraints
N/A
Range
- MONTH: months
- YEAR: years
Default Value
N/A
period_num
Yes
int
Definition
The number of periods.
Constraints
N/A
Range
- When period_type is set to MONTH, this value can be an integer ranging from 1 to 9.
- When period_type is set to YEAR, this value can be an integer ranging from 1 to 3.
Default Value
N/A
auto_pay_policy
No
String
Definition
Whether to enable automatic payment.
Constraints
N/A
Range
- YES: automatic payment
- NO (default): manual payment
Default Value
NO
auto_renew_policy
No
String
Definition
Whether to automatically renew the subscription upon expiration.
Constraints
N/A
Range
- YES: Auto renewal is enabled.
- NO (default): Auto renewal is disabled.
Default Value
NO
- URI example
POST https://rds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/49b9dd1d6f464ba4bc91df5cbd2e52ebin03/to-period
- Request example
Change the billing mode of an RDS instance from pay-per-use to yearly/monthly.
{ "period_type" : "MONTH", "period_num" : 6, "auto_pay_policy" : "NO", "auto_renew_policy" : "NO" }
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
order_id
String
Definition
ID of the order for changing the billing mode to yearly/monthly.
Range
N/A
- Example normal response
{ "order_id" : "CS2408170728W40QZ" }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot