Queries the fees that you must pay when you create, upgrade, or renew an ApsaraDB for Redis 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

Parameter Type Required Example Description
Action String Yes DescribePrice

The operation that you want to perform. Set the value to DescribePrice.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

Capacity Long No 1024

The storage capacity of the instance. Unit: MB. You must set InstanceClass or Capacity to specify the instance type. We recommend that you use InstanceClass to specify the instance type.

InstanceClass String No redis.master.small.default

Specify the instance type. You must set InstanceClass or Capacity to specify the instance type. We recommend that you use InstanceClass to specify the instance type.

To view the instance type, perform the following steps:

1. In the Overview topic, click the link in the Reference column corresponding to the instance type that you want to view.

2. In the instance type table of the page that appears, find the code corresponding to the instance type in the InstanceClass column.

OrderType String Yes BUY

The order type. Valid values:

  • BUY
  • UPGRADE
  • RENEW
  • CONVERT
ZoneId String No cn-hangzhou-e

The zone ID of the instance. You can call the DescribeZones operation to query the most recent zone list.

ChargeType String No PostPaid

The billing method of the instance. Valid values:

  • PostPaid: pay-as-you-go
  • PrePaid: subscription
Note Default value: PostPaid.
NodeType String No MASTER_SLAVE

The node type. Set the value to MASTER_SLAVE. This value indicates that the node type is master-replica.

Period Long No 3

The subscription period. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

Quantity Long No 1

The number of instances that you want to purchase. Valid values: 1 to 30.

Note Default value: 1.
InstanceId String No r-bp1zxszhcgatnx****

The ID of the instance.

Instances String No Instances=[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default","Period": "1","Quantity": "1","Capacity": "4096"}]

A JSON string that contains multiple instances. For more information, see Description of the Instances parameter in the DescribePrice API operation.

BusinessInfo String No 000000000000

The extended information such as the promotional event ID and business information.

CouponNo String No youhuiquan_promotion_option_id_for_blank

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank. This value indicates that no coupon code is available.

ForceUpgrade Boolean No true

Specifies whether to forcefully change the configurations of the instance. Default value: true. Valid values:

  • false: The system forcefully changes the configurations.
  • true: The system does not forcefully change the configurations.
Note Default value: true.
OrderParamOut String No true

Specifies whether to return parameters related to the order. Valid values:

  • false: The system does not return parameters related to the order.
  • true: The system returns parameters related to the order.
Note Default value: false.

Response parameters

Parameter Type Example Description
OrderParams String String

The parameters of the order. This parameter is returned when OrderParamOut is set to true.

RequestId String 3A40BE4E-1890-4972-889C-FEFA37663635

The ID of the request.

Order Object

The order information.

OriginalAmount String 0.21

The original price of the order.

HandlingFeeAmount String 0.1

The service fees of the order.

Currency String CNY

The currency used for payment. A value of CNY is used when the order was generated on the China site (aliyun.com), and a value of USD is used when the order was generated on the international site (alibabacloud.com).

DiscountAmount String 0.21

The discount amount of the order.

TradeAmount String 10

The actual price of the order.

Coupons Array of Coupon

Details about coupons.

Coupon
IsSelected String true

Indicates whether the coupon was selected.

CouponNo String youhuiquan_promotion_option_id_for_blank

The coupon number.

Name String test

The name of the coupon.

Description String coupondemo

The description of the coupon.

RuleIds Array of String 1001199213

Details about promotion rule IDs.

Rules Array of Rule

Details about promotion rules.

Rule
RuleDescId Long 1111111111

The ID of the rule.

Title String test

The title of the rule.

Name String test

The name of the rule.

SubOrders Array of SubOrder

Details about rules that match the coupon.

SubOrder
OriginalAmount String 0.21

The original price of the order.

InstanceId String r-bp1xxxxxxxxxxxxx

The ID of the instance.

DiscountAmount String 0.21

The discount amount of the order.

TradeAmount String 10

The actual price of the order.

RuleIds Array of String RuleId: 1111111111

Details about hit rule IDs.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=DescribePrice
&OrderType=BUY
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribePriceResponse>
    <Order>
        <Currency>CNY</Currency>
        <RuleIds>
        </RuleIds>
        <TradeAmount>0</TradeAmount>
        <OriginalAmount>0</OriginalAmount>
        <Coupons>
        </Coupons>
        <DiscountAmount>0</DiscountAmount>
    </Order>
    <RequestId>3A40BE4E-1890-4972-889C-FEFA37663635</RequestId>
    <SubOrders>
        <SubOrder>
            <RuleIds>
            </RuleIds>
            <TradeAmount>0</TradeAmount>
            <OriginalAmount>0</OriginalAmount>
            <DiscountAmount>0</DiscountAmount>
        </SubOrder>
    </SubOrders>
    <Rules>
    </Rules>
</DescribePriceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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" : [ ]
    }
  }
}

Description of sample responses

<props="intl">
<pre>
{
    "RequestId": "BA34B8E6-4119-49B0-BDA3-6ECD9B097A98",
    "Rules": {
        "Rule": [
            {
                "RuleId": "1020021003939076",
                "Name": "test"
            }
        ]
    },
    "PriceInfo": {
        "OriginalPrice": 1070,
        "Currency": "USD",
        "DiscountPrice": 1070,
        "RuleIds": {
            "RuleId": [
                "1020021003939076"
            ]
        },
        "TradePrice": 0,
        "Coupons": {
            "Coupon": []
        }
    }
}
</pre>
</props>

Error codes

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