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 Type Required Example Description
Action String Yes DescribePrice

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

OrderType String Yes BUY

The type of the order. Valid values:

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

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

InstanceId String No r-bp1zxszhcgatnx****

The ID of the instance.

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 the InstanceClass parameter 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 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 instance type and find the instanceclass in the InstanceClass column.

ZoneId String No cn-hangzhou-e

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

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 type of the node. Set the value to MASTER_SLAVE. This value specifies that the node is a master-replica node.

Period Long No 3

The subscription period. Unit: months. Valid values: 1 to 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.
Instances 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 String No 000000000000

The extended information such as promotion ID and business information.

CouponNo 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 Boolean No true

Specifies whether to forcibly change the type. Valid values:

  • false
  • true
Note Default value: true.
OrderParamOut String No true

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 number.

Description String coupondemo

The description of the coupon.

IsSelected String true

Indicates whether the coupon was selected.

Name String Free for internal settlement

The final price of the order.

Currency String CNY

The type of the currency.

DiscountAmount String 0.21

The discount amount of the order.

OriginalAmount String 0.21

The original price of the order.

RuleIds List RuleId: 1111111111

The ID of the hit rule.

TradeAmount String 10

The final price of the order.

SubOrders Array of SubOrder

The rules that match the coupon.

SubOrder
DiscountAmount String 0.21

The discount amount of the order.

InstanceId String r-bp1xxxxxxxxxxxxx

The ID of the instance.

OriginalAmount String 0.21

The original price of the order.

RuleIds List RuleId: 1111111111

The ID of the hit rule.

TradeAmount String 10

The final price of the order.

Rules Array of Rule

The promotion rules.

Rule
Name String Free for internal settlement

The final price of the order.

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
&OrderType=BUY
&RegionId=cn-hangzhou
&<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

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