Queries the fees to create, update, and renew ApsaraDB for Redis instances.

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 Location Type Required Example Description
Action Query String No DescribePrice

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

OrderType Query String Yes BUY

The type of the order. Valid values:

  • BUY
  • UPGRADE
  • RENEW
RegionId Host String Yes cn-hangzhou

The ID of the region where the instance is deployed. You can call the DescribeRegions operation to query IDs of available regions.

InstanceId Query String No r-bp1xxxxxxxxxxxxx

The ID of the ApsaraDB for Redis instance.

Capacity Query 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 the InstanceClass parameter to specify the instance type.

InstanceClass Query 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 the InstanceClass parameter to specify the instance type.

To query the instance type, perform the following steps:

1. In the Instance specifications topic, find the instance type and click the architecture type column to view the information about the instance type.

2. In the instance specifications table, select the target instance type and find the instanceclass in the InstanceClass column.

ZoneId Query String No cn-hangzhou-e

The ID of the zone. You can call the DescribeZones operation to query the zone ID.

ChargeType Query String No PostPaid

The billing method. Valid values:

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

The type of the node. Set the value to MASTER_SLAVE. This value specifies that the node is a master-replica node.

Period Query Long No 3

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

Quantity Query Long No 1

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

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

A JSON string that contains multiple instances. For more information, see Formats of Instances.

BusinessInfo Query String No 000000000000

The extended information such as activity ID and business information.

CouponNo Query String No youhuiquan_promotion_option_id_for_blank

The coupon code. By default, no coupon code is applied. Default value: youhuiquan_promotion_option_id_for_blank.

ForceUpgrade Query Boolean No true

Specifies whether to forcibly change configurations. Valid values:

  • false
  • true
Note Default value: true.
OrderParamOut Query String No "{\"autoPay\":false,\"autoUseCoupon\":false,\"bid\":\"26842\",\"buyerId\":xxxxxxxxxxxxxxx,\"commodities\":[{\"chargeType\":\"POSTPAY\",\"commodityCode\":\"kvstore\",\"components\":[{\"componentCode\":\"kvstore_instance_class\",\"free\":false,\"moduleAttrStatus\":1,\"moduleParams\":{},\"properties\":[{\"code\":\"kvstore_instance_class\",\"name\":\"redis.master.small.default\",\"value\":\"redis.master.small.default\"}]},{\"componentCode\":\"kvstore_region_no\",\"free\":false,\"moduleAttrStatus\":1...

Specifies whether to return order parameters. Valid values:

  • false
  • true
Note Default value: false.

Response parameters

Parameter Type Example Description
Order Struct

The order information.

Coupons Array of Coupon

The coupon information.

Coupon
CouponNo String youhuiquan_promotion_option_id_for_blank

The coupon code.

Description String coupondemo

The description of the coupon.

IsSelected String true

Indicates whether the coupon was selected.

Name String Free for internal settlement

The name of the rule.

Currency String CNY

The currency of the coupon.

DiscountAmount Float 0.21

The discount amount of the order.

OriginalAmount Float 0.21

The original price of the order.

RuleIds List RuleId: 1111111111

The ID of the hit rule.

TradeAmount Float 10

The final price of the order.

SubOrders Array of SubOrder

The rules that match the coupon.

SubOrder
DiscountAmount Float 0.21

The discount amount of the order.

InstanceId String r-bp1xxxxxxxxxxxxx

The ID of the ApsaraDB for Redis instance.

OriginalAmount Float 0.21

The original price of the order.

RuleIds List RuleId: 1111111111

The ID of the hit rule.

TradeAmount Float 10

The final price of the order.

Rules Array of Rule

The promotion rules.

Rule
Name String Free for internal settlement

The name of the rule.

RuleDescId Long 1111111111

The ID of the rule.

Title String demo

The title of the rule.

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

The ID of the request.

OrderParams String String

The parameters of the order. When OrderParamOut is set to true, this parameter is returned.

Examples

Sample requests

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

Sample success responses

XML format

<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

{
    "Order": {
        "Currency": "CNY",
        "RuleIds": {
            "RuleId": []
        },
        "TradeAmount": 0,
        "OriginalAmount": 0,
        "Coupons": {
            "Coupon": []
        },
        "DiscountAmount": 0
    },
    "RequestId": "3A40BE4E-1890-4972-889C-FEFA37663635",
    "SubOrders": {
        "SubOrder": [
            {
                "RuleIds": {
                    "RuleId": []
                },
                "TradeAmount": 0,
                "OriginalAmount": 0,
                "DiscountAmount": 0
            }
        ]
    },
    "Rules": {
        "Rule": []
    }
}

Error codes

HttpCode Error code Error message Description
400 MissingParameter Period is mandatory for this action. The error message returned because the instance ID is required.
400 MissingParameter InstanceId is mandatory for this action. The error message returned because the name or password of the instance is required.

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