Queries the fees that you must pay when you create, upgrade, or renew a Tair (Redis OSS-compatible) instance.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
kvstore:DescribePrice | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Capacity | long | No | The storage capacity of the instance. Unit: MB. This parameter is used only to query Redis Open-Source Edition instances that are deployed in classic mode. We recommend that you use the InstanceClass parameter to specify an exact instance type.
If you specify the InstanceClass parameter, you do not need to specify the Capacity parameter.
| 1024 |
InstanceClass | string | No | The instance type. To view the instance type, perform the following steps:
When you query cloud-native cluster instances, you must set this parameter to one of the following values and use the Instances parameter to specify the instance type that you want to query.
| redis.master.small.default |
OrderType | string | Yes | The order type. Valid values:
| BUY |
ZoneId | string | No | The zone ID of the instance. You can call the DescribeZones operation to query the most recent zone list. | cn-hangzhou-e |
ChargeType | string | No | The billing method. Valid values:
| PostPaid |
NodeType | string | No | The node type. Valid values:
| MASTER_SLAVE |
Period | long | No | The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. | 3 |
Quantity | long | No | The number of instances that you want to purchase. Valid values: 1 to 30. Default value: 1. | 1 |
InstanceId | string | No | The instance ID.
This parameter is required when the OrderType parameter is set to UPGRADE or RENEW.
| r-bp1zxszhcgatnx**** |
Instances | string | No | A JSON string that contains information about one or more cloud-native cluster instances. For more information, see the "Additional description of the Instances parameter" section of this topic. | Instances=[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default","Period": "1","Quantity": "1","Capacity": "4096"}] |
BusinessInfo | string | No | The extended information such as the promotional event ID and business information. | 000000000000 |
CouponNo | string | No | The coupon code. Default value: youhuiquan_promotion_option_id_for_blank. This value indicates that no coupon code is available. | youhuiquan_promotion_option_id_for_blank |
ForceUpgrade | boolean | No | Specifies whether to forcefully change the configurations of the instance. Valid values:
| true |
OrderParamOut | string | No | Specifies whether to return parameters related to the order. Valid values:
| true |
ShardCount | integer | No | The number of shards. This parameter is applicable only to cloud-native cluster instances. You can use this parameter to customize the number of shards. | 2 |
EngineVersion | string | No | The engine version of the 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.
Parameter | Type | Required | Example | Description |
---|
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | cn-hangzhou | The region ID. |
InstanceId | String | No | r-7xv4s7q131smyx**** | The ID of the instance. This parameter is required if the OrderType parameter is set to UPGRADE or RENEW. |
InstanceClass | String | Yes | redis.master.small.default | The instance type of a classic instance. For more information, see Overview . |
ShardClass | String | Yes | tair.rdb.2g | The instance type of a cloud-native instance. For more information, see Overview .You must specify this parameter or the InstanceClass parameter. |
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: month. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. |
Quantity | String | No | 1 | The number of instances that you want to purchase. Valid values: 1 to 30. Default value: 1. |
VPCId | String | No | vpc-bp1nme44gek34slfc**** | The virtual private cloud (VPC) ID. |
VSwitchId | String | No | vsw-bp1e7clcw529l773d**** | The ID of the vSwitch. |
AutoPay | String | No | true | Specifies whether to enable automatic payment. Valid values:
|
InstanceName | String | No | test_123 | The name of the instance. |
ShardCount | String | No | 2 | The number of shards. Default value: 1. You do not need to specify this parameter when you query standard or read/write splitting instances. This parameter is applicable only to cloud-native cluster instances. You can use this parameter to specify the number of shards. |
ReadOnlyCount | Integer | No | 2 | The total number of read replicas. This parameter is applicable only to cloud-native read/write splitting instances. |
StorageType | String | No | essd_pl2 | The storage type of a Tair ESSD-based instance. Valid values: essd_pl0, essd_pl1, essd_pl2, and essd_pl3. When you specify this parameter, you must also specify the Capacity parameter. For more information, see Specifications of ESSD/SSD-based instances. |
Capacity | Long | No | 512000 | The disk capacity of a Tair ESSD-based instance. Unit: MB. |
Sample request with the Instances parameter configured
Sample request for querying a Tair cloud-native cluster instance (Instances not required in this scenario):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.2g",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"ShardCount": 3
}
Sample request for querying a Tair ESSD-based instance of a specific 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"}]",
}
Sample request for querying a Tair cloud-native 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"}]"
}
Sample request for querying multiple 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"}]"
}
Sample request for renewing a Tair cloud-native cluster instance (Instances 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 parameters
Examples
Sample success responses
JSON
format
{
"OrderParams": "String",
"RequestId": "3A40BE4E-1890-4972-889C-FEFA37663635",
"Order": {
"OriginalAmount": "0.21",
"HandlingFeeAmount": "0.1",
"Currency": "CNY",
"DiscountAmount": "0.21",
"TradeAmount": "10",
"Coupons": {
"Coupon": [
{
"IsSelected": "true",
"CouponNo": "youhuiquan_promotion_option_id_for_blank",
"Name": "test",
"Description": "coupondemo"
}
]
},
"RuleIds": {
"RuleId": [
"1001199213"
]
},
"ShowDiscountInfo": true,
"DepreciateInfo": {
"ListPrice": 0,
"OriginalStandAmount": 0,
"CheapStandAmount": 0,
"CheapRate": 0,
"Differential": 0,
"DifferentialName": "XXXXX",
"MonthPrice": 0,
"IsContractActivity": false,
"IsShow": true,
"ContractActivity": {
"FinalPromFee": 0,
"FinalFee": 0,
"ProdFee": 0,
"ActivityId": 0,
"OptionCode": "****",
"ActivityName": "",
"OptionIds": {
"OptionId": [
0
]
}
}
},
"StandDiscountPrice": 0,
"IsContractActivity": true,
"StandPrice": 0,
"Code": "\"\"\n",
"Message": "\"\""
},
"Rules": {
"Rule": [
{
"RuleDescId": 1111111111,
"Title": "test",
"Name": "test"
}
]
},
"SubOrders": {
"SubOrder": [
{
"OriginalAmount": "0.21",
"InstanceId": "r-bp1xxxxxxxxxxxxx",
"DiscountAmount": "0.21",
"TradeAmount": "10",
"RuleIds": {
"RuleId": [
"RuleId: 1111111111"
]
},
"OptionalPromotions": {
"OptionalPromotion": [
{
"Selected": false,
"CouponNo": "default",
"Name": "****",
"Description": "****",
"Show": true,
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"OptionCode": "****",
"PromotionName": "****",
"PromotionOptionNo": "youhuiquan_promotion_option_id_for_blank",
"CanPromFee": "****"
}
]
},
"DepreciateInfo": {
"ListPrice": 0,
"OriginalStandAmount": 0,
"CheapStandAmount": 0,
"CheapRate": 0,
"Differential": 0,
"DifferentialName": "****",
"MonthPrice": 0,
"IsContractActivity": false,
"ContractActivity": {
"FinalPromFee": 0,
"FinalFee": 0,
"ProdFee": 0,
"ActivityId": 1412025702634847,
"OptionCode": "****",
"ActivityName": "****",
"OptionIds": {
"OptionId": [
0
]
}
},
"StartTime": "2024-11-18T00:00:00Z"
},
"StandDiscountPrice": 0,
"IsContractActivity": true,
"StandPrice": 0,
"ModuleInstance": {
"ModuleInstance": [
{
"ModuleCode": "****",
"ModuleId": "****",
"StandPrice": 0,
"PricingModule": true,
"ModuleName": "****",
"DiscountFee": 0,
"TotalProductFee": 0,
"NeedOrderPay": true,
"PayFee": 0,
"ModuleAttrs": {
"moduleAttr": [
{
"Type": 0,
"Value": "****",
"Code": "****",
"Name": "****"
}
]
},
"ContractActivity": true,
"DepreciateInfo": {
"ListPrice": 0,
"OriginalStandAmount": 0,
"CheapStandAmount": 0,
"CheapRate": 0,
"Differential": 0,
"DifferentialName": "****",
"MonthPrice": 0,
"IsContractActivity": true,
"IsShow": true,
"StartTime": "2024-09-23T14:00:01Z"
}
}
]
},
"PromDetailList": {
"PromDetail": [
{
"PromotionName": "****",
"PromotionId": 0,
"FinalPromFee": 0,
"OptionCode": "****",
"PromType": "****",
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"DerivedPromType": "****",
"PromotionCode": "****"
}
]
},
"ContractActivity": true
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter | Period is mandatory for this action. | - |
400 | MissingParameter | InstanceId 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. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
Change time | Summary of changes | Operation |
---|---|---|
2025-03-25 | API Description Update. The Error code has changed | View Change Details |
2025-02-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-07-31 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-04-10 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-04-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-03-26 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-02-28 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-09-18 | The Error code has changed. The response structure of the API has changed | View Change Details |