Queries the fees incurred by operations such as creation, upgrade, or renewal of ApsaraDB for Tair (Redis OSS-Compatible) database instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:DescribePrice |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. You can call DescribeRegions to query region IDs. |
cn-hangzhou |
| Capacity |
integer |
No |
The storage capacity of the instance, which is used to specify the instance type. Unit: MB. This parameter applies only to instances of ApsaraDB for Redis Community Edition in the classic deployment mode. We recommend that you use the InstanceClass parameter to specify an exact instance type. Note
If you specify the InstanceClass parameter, you do not need to specify this parameter. |
1024 |
| InstanceClass |
string |
No |
The instance type code. To query the InstanceClass code, perform the following steps:
Note
For example, to query the price of a newly purchased instance, you must specify at least the following parameters in addition to other key parameters:
|
redis.master.small.default |
| OrderType |
string |
Yes |
The order type. Valid values:
|
BUY |
| ZoneId |
string |
No |
The zone ID. You can call DescribeZones to query zone IDs. |
cn-hangzhou-e |
| SecondaryZoneId |
string |
No |
The secondary zone ID. You can call DescribeZones to query zone IDs. Note
The value of this parameter must be different from the value of the ZoneId parameter. |
cn-hangzhou-g |
| ChargeType |
string |
No |
The billing method. Valid values:
|
PostPaid |
| NodeType |
string |
No |
The node type. Valid values:
|
MASTER_SLAVE |
| Period |
integer |
No |
The subscription duration. Unit: months. Valid values: 1 to 9, 12, 24, and 36. |
3 |
| Quantity |
integer |
No |
The number of instances to purchase. Valid values: 1 to 30. Default value: 1. |
1 |
| InstanceId |
string |
No |
The instance ID. Note
This parameter is required when the OrderType parameter is set to UPGRADE or RENEW. |
r-bp1zxszhcgatnx**** |
| Instances |
string |
No |
The instances to query. This parameter is required when you query the prices of cloud-native instances in read/write splitting architecture, Tair ESSD instances, or multiple instances of different types. The value is a JSON string. For more information, see the supplementary description of the Instances parameter below. |
[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass": "tair.scm.with.proxy.standard.2m.8d","ShardCount": "3","Period": "1","Quantity": "1"}] |
| BusinessInfo |
string |
No |
The extended information such as the activity ID and business information. |
000000000000 |
| CouponNo |
string |
No |
The coupon code. Default value: youhuiquan_promotion_option_id_for_blank, which indicates that no coupon code is used. |
youhuiquan_promotion_option_id_for_blank |
| ForceUpgrade |
boolean |
No |
Specifies whether to forcibly change the instance configurations. Valid values:
|
true |
| OrderParamOut |
string |
No |
Specifies whether to return the order parameters. Valid values:
|
true |
| ShardCount |
integer |
No |
The number of data shard nodes in a cloud-native cluster instance. |
2 |
| EngineVersion |
string |
No |
Database engine version of the Redis instance. Valid values: 2.8, 4.0, and 5.0. |
5.0 |
Additional description of the Instances parameter
The following description applies only to the Instances parameter of the DescribePrice operation and does not apply to other operations.
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| RegionId | String | Yes | cn-hangzhou | The region ID. |
| InstanceId | String | No | r-7xv4s7q131smyx**** | The instance ID. This parameter is required when OrderType is set to UPGRADE or RENEW. |
| InstanceClass | String | Yes | redis.master.small.default | The instance type of a Classic Edition instance. For more information, see Instance types. |
| ShardClass | String | Yes | tair.rdb.2g | The instance type of a cloud-native instance. For more information, see Instance types. You must specify either this parameter or InstanceClass. |
| IzNo | String | No | cn-hangzhou-b | The zone ID. |
| NodeType | String | No | MASTER_SLAVE | The node type. Valid values:
|
| Period | Long | No | 1 | The subscription duration. Unit: months. Valid values: 1 to 9, 12, 24, and 36. |
| Quantity | String | No | 1 | The number of instances to purchase. Valid values: 1 to 30. Default value: 1. |
| VPCId | String | No | vpc-bp1nme44gek34slfc**** | The VPC ID. |
| VSwitchId | String | No | vsw-bp1e7clcw529l773d**** | The vSwitch ID. |
| AutoPay | String | No | true | Specifies whether to enable automatic payment. Valid values:
|
| InstanceName | String | No | test_123 | The instance name. |
| ShardCount | String | No | 2 | The number of shard nodes. Default value: 1. This parameter is not required when you query the price of standard or read/write splitting instances. This parameter applies only to cloud-native cluster instances. You can use this parameter to specify a custom number of shards. |
| ReadOnlyCount | Integer | No | 2 | The total number of read-only nodes. This parameter applies only to cloud-native read/write splitting instances. |
| StorageType | String | No | essd_pl2 | The storage type of Tair ESSD instances. Valid values: essd_pl0, essd_pl1, essd_pl2, and essd_pl3. If you specify this parameter, you must also specify Capacity to define a custom disk capacity. For more information, see Disk-based instance types. |
| Capacity | Long | No | 512000 | The disk capacity of Tair ESSD instances. Unit: MB. |
Request examples
Example of querying the price of a new cloud-native Tair cluster instance (the Instances parameter is not required in this scenario):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.2g",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"ShardCount": 3
}
Example of querying the price of a new Tair ESSD instance with a custom storage type:
{
"RegionId": "cn-hangzhou",
"OrderType": "BUY",
"ChargeType": "PostPaid",
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-h", "ShardClass": "tair.essd.standard.2xlarge", "ShardCount": "1","Capacity": "512000","StorageType": "essd_pl2"}]",
}
Example of querying the price of a new cloud-native Tair read/write splitting instance:
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.2g",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass":"tair.rdb.with.proxy.2g","ReadOnlyCount":"2"}]"
}
Example of querying the price of multiple new instances:
{
"RegionId": "cn-hangzhou",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default"}{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.amber.logic.sharding.1g.2db.0rodb.6proxy.multithread"}{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass":"tair.rdb.with.proxy.2g","ShardCount":"3"}]"
}
Example of querying the price of renewing a cloud-native Tair cluster instance (the Instances parameter is not required in this scenario):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.1g",
"OrderType": "RENEW",
"ChargeType": "PrePaid",
"Period": 12,
"InstanceId": "r-d7****l3v0xmorw1xp",
"ShardCount": 3
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Order |
object |
The order information. |
|
| Code |
string |
The order code. |
"" |
| Coupons |
object |
||
| Coupon |
array<object> |
The coupon information. |
|
|
array<object> |
The coupon information. |
||
| ActivityExtInfo |
object |
The coupon transparency information. |
|
| CouponNo |
string |
The coupon number. |
youhuiquan_promotion_option_id_for_blank |
| Description |
string |
The coupon description. |
coupondemo |
| Effective |
boolean |
Indicates whether the coupon is available. |
|
| IsSelected |
string |
Indicates whether the coupon is selected. |
true |
| Name |
string |
The coupon name. |
test |
| Currency |
string |
The currency. The value is CNY for the China site and USD for the international site. |
CNY |
| DepreciateInfo |
object |
The promotion information. |
|
| CheapRate |
integer |
The price reduction rate. |
30% |
| CheapStandAmount |
integer |
The total official website price after the price reduction. |
9* |
| ContractActivity |
object |
The promotion information. |
|
| ActivityId |
integer |
The promotion ID. |
**** |
| ActivityName |
string |
The promotion name. |
Contract discount_Entire order_xxx% off |
| FinalFee |
number |
The discounted fee. |
|
| FinalPromFee |
number |
The total discount amount. |
|
| OptionCode |
string |
The discount ID. |
**** |
| OptionIds |
object |
||
| OptionId |
array |
The list of discount IDs. |
|
|
integer |
The discount ID. |
***** |
|
| ProdFee |
number |
The original price. |
**** |
| Differential |
integer |
The price difference discount displayed in the total order price. |
** |
| DifferentialName |
string |
The name of the price difference discount. |
XXXXX |
| IsContractActivity |
boolean |
Indicates whether a contract discount is applied. |
false |
| IsShow |
boolean |
Indicates whether the price reduction rate is displayed. |
true |
| ListPrice |
integer |
The list price. |
1* |
| MonthPrice |
integer |
The equivalent monthly price. |
** |
| OriginalStandAmount |
integer |
The original total official website price. |
12* |
| DiscountAmount |
string |
The order discount amount. |
0.21 |
| HandlingFeeAmount |
string |
The handling fee. |
0.1 |
| IsContractActivity |
boolean |
Indicates whether a contract discount is applied. |
false |
| Message |
string |
The order information. |
"" |
| OriginalAmount |
string |
The original order price. |
0.21 |
| RuleIds |
object |
||
| RuleId |
array |
The promotion ID. |
|
|
string |
The promotion ID. |
[202] |
|
| ShowDiscountInfo |
boolean |
Indicates whether the discount information is displayed. |
|
| StandDiscountPrice |
integer |
The discounted price. |
**** |
| StandPrice |
integer |
The discount price. |
0 |
| TradeAmount |
string |
The actual transaction price of the order. |
10 |
| OrderParams |
string |
The order parameters. This parameter is returned when OrderParamOut is set to |
String |
| RequestId |
string |
The request ID. |
3A40BE4E-1890-4972-889C-FEFA37663635 |
| Rules |
object |
||
| Rule |
array<object> |
The promotion rules. |
|
|
object |
|||
| Name |
string |
The promotion name. |
test |
| RuleDescId |
integer |
The rule ID. |
1111111111 |
| Title |
string |
The rule title. |
test |
| SubOrders |
object |
||
| SubOrder |
array<object> |
The rules corresponding to the coupon. |
|
|
array<object> |
|||
| ContractActivity |
boolean |
Indicates whether a contract discount is applied. |
**** |
| DepreciateInfo |
object |
The price reduction information. |
|
| CheapRate |
integer |
The price reduction rate. |
**** |
| CheapStandAmount |
integer |
The total official website price after the price reduction. |
**** |
| ContractActivity |
object |
The contract discount. |
|
| ActivityId |
integer |
The promotion ID. |
1412025702634847 |
| ActivityName |
string |
The promotion name. |
**** |
| FinalFee |
number |
The discounted fee. |
**** |
| FinalPromFee |
number |
The total discount amount. |
**** |
| OptionCode |
string |
The discount ID. |
**** |
| OptionIds |
object |
||
| OptionId |
array |
The list of discount IDs. |
|
|
integer |
The discount ID. |
|
|
| ProdFee |
number |
The original price. |
**** |
| Differential |
integer |
The price difference discount displayed in the total order price. |
**** |
| DifferentialName |
string |
The name of the price difference discount. |
**** |
| IsContractActivity |
boolean |
Indicates whether a contract discount is applied. |
false |
| ListPrice |
integer |
The list price. |
**** |
| MonthPrice |
integer |
The equivalent monthly price. |
**** |
| OriginalStandAmount |
integer |
The original total official website price. |
**** |
| StartTime |
string |
The promotion start time. |
2024-11-18T00:00:00Z |
| DiscountAmount |
string |
The order discount amount. |
0.21 |
| InstanceId |
string |
The instance ID. |
r-bp1xxxxxxxxxxxxx |
| IsContractActivity |
boolean |
Indicates whether a contract discount is applied. |
**** |
| ModuleInstance |
object |
||
| ModuleInstance |
array<object> |
The instance configuration of the order line. |
|
|
array<object> |
The child object of the instance configuration for the order line. |
||
| ContractActivity |
boolean |
Indicates whether a contract discount is applied. |
**** |
| DepreciateInfo |
object |
The price reduction information. |
|
| CheapRate |
number |
The price reduction rate. |
****** |
| CheapStandAmount |
number |
The total official website price after the price reduction. |
**** |
| Differential |
number |
The price difference discount displayed in the total order price. |
**** |
| DifferentialName |
string |
The name of the price difference discount. |
**** |
| IsContractActivity |
boolean |
Indicates whether a contract discount is applied. |
**** |
| IsShow |
boolean |
Indicates whether the price reduction rate is displayed. |
true |
| ListPrice |
number |
The list price. |
**** |
| MonthPrice |
number |
The equivalent monthly price. |
**** |
| OriginalStandAmount |
number |
The original total official website price. |
**** |
| StartTime |
string |
The promotion start time. |
2024-09-23T14:00:01Z |
| DiscountFee |
number |
The discount fee. |
**** |
| ModuleAttrs |
object |
||
| moduleAttr |
array<object> |
The module attributes. |
|
|
object |
The order parameters. |
||
| Code |
string |
The attribute code. |
**** |
| Name |
string |
The attribute name. |
**** |
| Type |
integer |
The attribute type. |
**** |
| Value |
string |
The attribute type. |
**** |
| ModuleCode |
string |
The module code. |
**** |
| ModuleId |
string |
The module ID. |
**** |
| ModuleName |
string |
The module name. |
**** |
| NeedOrderPay |
boolean |
Specifies whether payment is required in the order. |
true |
| PayFee |
number |
The actual payment amount. |
0.0 |
| PricingModule |
boolean |
Specifies whether the item is billable. |
**** |
| StandPrice |
number |
The discount price. |
**** |
| TotalProductFee |
number |
The original price of the product. |
0.0 |
| OptionalPromotions |
object |
||
| OptionalPromotion |
array<object> |
The list of available promotion options. |
|
|
array<object> |
|||
| ActivityExtInfo |
object |
The additional information about the promotion. |
**** |
| CanPromFee |
string |
The available discount amount. |
**** |
| CouponNo |
string |
Specifies whether to use a coupon. Valid values:
|
default |
| Description |
string |
The remarks. |
**** |
| Effective |
boolean |
Indicates whether the coupon is available. |
|
| Name |
string |
The coupon name. |
**** |
| OptionCode |
string |
The additional information about the promotion. |
**** |
| PromotionName |
string |
The promotion name. |
**** |
| PromotionOptionNo |
string |
The promotion option number. |
youhuiquan_promotion_option_id_for_blank |
| Selected |
boolean |
Specifies whether the option is selected externally. |
false |
| Show |
boolean |
Specifies whether the promotion is displayed. |
False |
| OriginalAmount |
string |
The original order price. |
0.21 |
| PromDetailList |
object |
||
| PromDetail |
array<object> |
The promotion details. |
|
|
array<object> |
The promotion information. |
||
| ActivityExtInfo |
object |
The additional information about the promotion. |
**** |
| DerivedPromType |
string |
The promotion subtype. |
**** |
| FinalPromFee |
number |
The discount amount. |
**** |
| OptionCode |
string |
The coupon code. |
**** |
| PromType |
string |
The promotion subtype. |
**** |
| PromotionCode |
string |
The promotion code. |
**** |
| PromotionId |
integer |
The discount ID. |
**** |
| PromotionName |
string |
The name of the promotion activity. |
**** |
| RuleIds |
object |
||
| RuleId |
array |
The promotion ID. |
|
|
string |
The ID of the matched rule. |
RuleId: 1111111111 |
|
| StandDiscountPrice |
integer |
The discounted price. |
**** |
| StandPrice |
integer |
The discount price. |
**** |
| TradeAmount |
string |
The actual transaction price of the order. |
10 |
Examples
Success response
JSON format
{
"Order": {
"Code": "\"\"\n",
"Coupons": {
"Coupon": [
{
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"CouponNo": "youhuiquan_promotion_option_id_for_blank",
"Description": "coupondemo",
"Effective": false,
"IsSelected": "true",
"Name": "test"
}
]
},
"Currency": "CNY",
"DepreciateInfo": {
"CheapRate": 0,
"CheapStandAmount": 0,
"ContractActivity": {
"ActivityId": 0,
"ActivityName": "Contract discount_Entire order_xxx% off",
"FinalFee": 0,
"FinalPromFee": 0,
"OptionCode": "****",
"OptionIds": {
"OptionId": [
0
]
},
"ProdFee": 0
},
"Differential": 0,
"DifferentialName": "XXXXX",
"IsContractActivity": false,
"IsShow": true,
"ListPrice": 0,
"MonthPrice": 0,
"OriginalStandAmount": 0
},
"DiscountAmount": "0.21",
"HandlingFeeAmount": "0.1",
"IsContractActivity": true,
"Message": "\"\"",
"OriginalAmount": "0.21",
"RuleIds": {
"RuleId": [
"[202]"
]
},
"ShowDiscountInfo": false,
"StandDiscountPrice": 0,
"StandPrice": 0,
"TradeAmount": "10"
},
"OrderParams": "String",
"RequestId": "3A40BE4E-1890-4972-889C-FEFA37663635",
"Rules": {
"Rule": [
{
"Name": "test",
"RuleDescId": 1111111111,
"Title": "test"
}
]
},
"SubOrders": {
"SubOrder": [
{
"ContractActivity": true,
"DepreciateInfo": {
"CheapRate": 0,
"CheapStandAmount": 0,
"ContractActivity": {
"ActivityId": 1412025702634847,
"ActivityName": "****",
"FinalFee": 0,
"FinalPromFee": 0,
"OptionCode": "****",
"OptionIds": {
"OptionId": [
0
]
},
"ProdFee": 0
},
"Differential": 0,
"DifferentialName": "****",
"IsContractActivity": false,
"ListPrice": 0,
"MonthPrice": 0,
"OriginalStandAmount": 0,
"StartTime": "2024-11-18T00:00:00Z"
},
"DiscountAmount": "0.21",
"InstanceId": "r-bp1xxxxxxxxxxxxx",
"IsContractActivity": true,
"ModuleInstance": {
"ModuleInstance": [
{
"ContractActivity": true,
"DepreciateInfo": {
"CheapRate": 0,
"CheapStandAmount": 0,
"Differential": 0,
"DifferentialName": "****",
"IsContractActivity": true,
"IsShow": true,
"ListPrice": 0,
"MonthPrice": 0,
"OriginalStandAmount": 0,
"StartTime": "2024-09-23T14:00:01Z"
},
"DiscountFee": 0,
"ModuleAttrs": {
"moduleAttr": [
{
"Code": "****",
"Name": "****",
"Type": 0,
"Value": "****"
}
]
},
"ModuleCode": "****",
"ModuleId": "****",
"ModuleName": "****",
"NeedOrderPay": true,
"PayFee": 0,
"PricingModule": true,
"StandPrice": 0,
"TotalProductFee": 0
}
]
},
"OptionalPromotions": {
"OptionalPromotion": [
{
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"CanPromFee": "****",
"CouponNo": "default",
"Description": "****",
"Effective": false,
"Name": "****",
"OptionCode": "****",
"PromotionName": "****",
"PromotionOptionNo": "youhuiquan_promotion_option_id_for_blank",
"Selected": false,
"Show": true
}
]
},
"OriginalAmount": "0.21",
"PromDetailList": {
"PromDetail": [
{
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"DerivedPromType": "****",
"FinalPromFee": 0,
"OptionCode": "****",
"PromType": "****",
"PromotionCode": "****",
"PromotionId": 0,
"PromotionName": "****"
}
]
},
"RuleIds": {
"RuleId": [
"RuleId: 1111111111"
]
},
"StandDiscountPrice": 0,
"StandPrice": 0,
"TradeAmount": "10"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | Period is mandatory for this action. | |
| 400 | InvalidInstances.Format | The Specified parameter Instances is not valid. | The Instances parameter passed in is invalid |
| 400 | AlreadyHadTemporaryBandwidth | This instance have already had temporary bandwidth, please modify instance spec first. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.