You can call the DescribeRenewalPrice operation to query the fee that is required to renew an ApsaraDB RDS instance.
This operation is supported only for subscription instances.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeRenewalPrice |
The operation that you want to perform. Set the value to DescribeRenewalPrice. |
| DBInstanceId | String | Yes | rm-uf6wjk5xxxxxx |
The ID of the instance. |
| TimeType | String | Yes | Year |
The renewal cycle of the instance. Valid values:
|
| UsedTime | Integer | Yes | 1 |
The subscription period of the instance. Valid values:
|
| ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
The client token that is used to ensure the idempotence of the request. |
| RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. |
| PayType | String | No | Postpaid |
The billing method of the instance. Valid values:
|
| DBInstanceClass | String | No | mysql.n2.medium.2c |
The instance type of the instance. For more information, see Primary instance types. By default, the current instance type is retained. |
| Quantity | Integer | No | 1 |
The number of instances that you want to renew. Default value: 1. |
| OrderType | String | No | BUY |
The type of the purchase order. Set the value to BUY. |
| BusinessInfo | String | No | 121436975448952 |
The extended business information of the instance. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Rules | Array of Rule |
The specifications of the promotion. |
|
| Rule | |||
| RuleId | Long | 1001199213 |
The ID of the promotion. |
| Name | String | test |
The name of the promotion. |
| Description | String | Content |
The description of the promotion. |
| PriceInfo | Struct |
An array that consists of price information. |
|
| Currency | String | CNY |
The currency unit that is used to calculate the renewal fee. |
| ActivityInfo | Struct |
The price for the renewal. |
|
| CheckErrMsg | String | Error |
The description of the error that occurs. |
| ErrorCode | String | 123456 |
The code of the error that occurs. |
| Success | String | Success |
Indicates whether the renewal is successful. |
| OriginalPrice | Float | 138 |
The original price for the renewal. |
| DiscountPrice | Float | 27 |
The discount for the renewal. |
| TradePrice | Float | 111 |
The discounted price for the renewal. The discounted price is equal to the original price minus the discount. |
| Coupons | Array of Coupon |
An array that consists of vouchers. |
|
| Coupon | |||
| Name | String | test |
The name of the voucher. |
| Description | String | test |
The description of the voucher. |
| CouponNo | String | 123456 |
The ID of the voucher. |
| IsSelected | String | true |
Indicates whether a voucher is selected. |
| RuleIds | List | 1001199213 |
The ID of the promotion. |
| RequestId | String | DC9F4EF6-D038-4405-B497-1F48E722C9F2 |
The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/? Action=DescribeRenewalPrice
&TimeType=Year
&UsedTime=1
&DBInstanceId=rm-uf6wjk5xxxxxx
&<Common request parameters>
Sample success responses
XML format
<DescribeRenewalPriceResponse>
<RequestId>BA34B8E6-4119-49B0-BDA3-6ECD9B097A98</RequestId>
<Rules>
<Rule>
<RuleId>1020021003939076</RuleId>
<Name>test</Name>
</Rule>
</Rules>
<PriceInfo>
<OriginalPrice>1070</OriginalPrice>
<Currency>CNY</Currency>
<DiscountPrice>1070</DiscountPrice>
<RuleIds>
<RuleId>1020021003939076</RuleId>
</RuleIds>
<TradePrice>0</TradePrice>
<Coupons>
</Coupons>
</PriceInfo>
</DescribeRenewalPriceResponse>
JSON format
{
"RequestId": "BA34B8E6-4119-49B0-BDA3-6ECD9B097A98",
"Rules": {
"Rule": [
{
"RuleId": "1020021003939076",
"Name": "test"
}
]
},
"PriceInfo": {
"OriginalPrice": 1070,
"Currency": "CNY",
"DiscountPrice": 1070,
"RuleIds": {
"RuleId": [
"1020021003939076"
]
},
"TradePrice": 0,
"Coupons": {
"Coupon": []
}
}
}
Error codes
For a list of error codes, visit the API Error Center.