Queries the renewal fees of an ApsaraDB for RDS instance.

Query the cost of a prepaid instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Name 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 to be queried.

TimeType String Yes Year

The renewal period of the instance. Valid values:

  • Year
  • Month
UsedTime Integer Yes 1

The duration of the instance. Valid values:

  • When the parameter TimeType= Year, the value is1~3.
  • When the parameter TimeType= Month, the value is1~9.
ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to ensure idempotence of the request.

RegionId String No cn-hangzhou

The ID of the region. 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:

  • Postpaid: specifies to use pay-as-you-go billing.
  • Prepaid: specifies to use subscription billing.
DBInstanceClass String No mysql.n2.medium.2c

The type of the instance. For more information about specifications, see primary instance types. The default value is the instance type.

Quantity Integer No 1

Number of instances. Default value:1.

OrderType String No BUY

The type of the order. Unique values only: BUY.

BusinessInfo String No 121436975448952

The extended business information of the instance.

Response parameters

Parameter Type Example Description
Rules Array

Activity specifications.

Rule
RuleId Long 1001199213

The ID of the rule.

Name String test

The name of the activity.

Description String Content introduction

Activity description.

PriceInfo Struct

The list of price information.

Currency String USD

The currency unit.

ActivityInfo Struct

The price information.

CheckErrMsg String Description

The error description.

ErrorCode String 123456

Error code

Success String Success

Indicates whether the job was successfully submitted.

OriginalPrice Float 138

The original price.

DiscountPrice Float 27

The discount.

TradePrice Float 111

The transaction price, which is equal to the original price minus the discount.

Coupons Array

The discount information list.

Coupon
Name String test

The name of the coupon.

Description String test

The coupon description.

CouponNo String 123456

The ID of the coupon that you want to use in the task.

IsSelected String true

Indicates whether a coupon is selected.

RuleIds List 1001199213

The ID of the rule.

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>
  <PriceInfo>
        <RuleIds>
              <RuleId>1001199213</RuleId>
        </RuleIds>
        <DiscountPrice>1480</DiscountPrice>
        <Coupons>
    </Coupons>
        <OriginalPrice>1480</OriginalPrice>
        <TradePrice>0</TradePrice>
        <Currency>CNY</Currency>
  </PriceInfo>
  <RequestId>DC9F4EF6-D038-4405-B497-1F48E722C9F2</RequestId>
  <Rules>
        <Rule>
              <Name>xxxxx</Name>
              <RuleId>1001199213</RuleId>
        </Rule>
  </Rules>
</DescribeRenewalPriceResponse>

JSON format

{
    "PriceInfo": {
        "RuleIds": {
            "RuleId": [
                1001199213
            ]
        },
        "DiscountPrice": 1480,
        "Coupons": {
            "Coupon": []
        },
        "OriginalPrice": 1480,
        "TradePrice": 0,
        "Currency": "CNY"
    },
    "RequestId": "DC9F4EF6-D038-4405-B497-1F48E722C9F2",
    "Rules": {
        "Rule": [
            {
                "Name": "xxxxx",
                "RuleId": 1001199213
            }
        ]
    }
}

Error codes

For a list of error codes, visit the API Error Center.