查询创建、升级配置或续费云数据库 Tair(兼容 Redis)实例等操作产生的费用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
kvstore:DescribePrice |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
否 |
地域 ID,可调用 DescribeRegions 查询。 |
cn-hangzhou |
| Capacity |
integer |
否 |
使用实例的存储容量指定规格,单位为 MB。本参数仅查询 Redis 开源版经典部署模式的实例,推荐您使用 InstanceClass 参数精确地指定一个规格。 说明
指定 InstanceClass 参数后,无需再指定本参数。 |
1024 |
| InstanceClass |
string |
否 |
使用 InstanceClass 编码指定实例规格。InstanceClass 查询步骤:
说明
以查询新购场景为例,除其他关键参数以外,您至少需要传入如下参数:
|
redis.master.small.default |
| OrderType |
string |
是 |
订单类型,取值:
枚举值:
|
BUY |
| ZoneId |
string |
否 |
可用区 ID,可调用 DescribeZones 查询。 |
cn-hangzhou-e |
| SecondaryZoneId |
string |
否 |
备可用区 ID,可调用 DescribeZones 接口查询。 说明
本参数和 ZoneId 参数传入的值不能相同。 |
cn-hangzhou-g |
| ChargeType |
string |
否 |
付费类型,取值:
枚举值:
|
PostPaid |
| NodeType |
string |
否 |
节点类型,取值:
枚举值:
|
MASTER_SLAVE |
| Period |
integer |
否 |
包年包月时长,单位为月。取值范围:1~9、12、24、36。 |
3 |
| Quantity |
integer |
否 |
购买实例的数量,取值范围:1~30,默认值为 1。 |
1 |
| InstanceId |
string |
否 |
实例 ID。 说明
当 OrderType 为 UPGRADE 或 RENEW 时必传。 |
r-bp1zxszhcgatnx**** |
| Instances |
string |
否 |
当您需要查询云原生版读写分离架构、Tair ESSD 型实例或多个不同规格的实例时,需要传入本参数,为 JSON 格式字符串,更多信息请参见下方的Instances 参数补充说明。 |
[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass": "tair.scm.with.proxy.standard.2m.8d","ShardCount": "3","Period": "1","Quantity": "1"}] |
| BusinessInfo |
string |
否 |
活动 ID、业务信息等扩展信息。 |
000000000000 |
| CouponNo |
string |
否 |
优惠码,默认值:youhuiquan_promotion_option_id_for_blank,表示无优惠码。 |
youhuiquan_promotion_option_id_for_blank |
| ForceUpgrade |
boolean |
否 |
是否强制变配,取值:
|
true |
| OrderParamOut |
string |
否 |
是否返回订单参数,可选值:
|
true |
| ShardCount |
integer |
否 |
云原生集群实例中的数据分片节点的数量。 |
2 |
| EngineVersion |
string |
否 |
Redis 实例的引擎版本,取值:2.8、4.0、5.0或6.0。 |
5.0 |
| NeedUnavailableCoupon |
boolean |
否 |
是否返回不可用优惠券 |
Instances 参数补充说明
以下说明仅适用于 DescribePrice 接口 Instances 参数的补充说明,不适用于其它接口。
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| RegionId | String | 是 | cn-hangzhou | 地域 ID。 |
| InstanceId | String | 否 | r-7xv4s7q131smyx**** | 实例 ID,当 OrderType 为 UPGRADE 或 RENEW 时必传。 |
| InstanceClass | String | 是 | redis.master.small.default | 经典版实例的实例规格,请参见规格查询导航。 |
| ShardClass | String | 是 | tair.rdb.2g | 云原生版实例的实例规格,请参见规格查询导航。 本参数和 InstanceClass 两者中必须传入一项。 |
| IzNo | String | 否 | cn-hangzhou-b | 可用区 ID。 |
| NodeType | String | 否 | MASTER_SLAVE | 节点类型,取值:
|
| Period | Long | 否 | 1 | 包年包月时长,单位为月。取值范围:1~9、12、24、36。 |
| Quantity | String | 否 | 1 | 购买实例的数量,取值范围:1~30。默认值:1。 |
| VPCId | String | 否 | vpc-bp1nme44gek34slfc**** | VPC ID。 |
| VSwitchId | String | 否 | vsw-bp1e7clcw529l773d**** | 虚拟交换机 ID。 |
| AutoPay | String | 否 | true | 是否自动付款,取值:
|
| InstanceName | String | 否 | test_123 | 实例名称。 |
| ShardCount | String | 否 | 2 | 分片节点数,默认为 1,查询标准架构、读写分离架构实例时无需传入该参数。本参数仅适用于查询云原生版集群架构实例,您可以通过该参数实现自定义分片数量。 |
| ReadOnlyCount | Integer | 否 | 2 | 总只读节点数量,本参数仅适用于创建云原生版读写分离架构实例。 |
| StorageType | String | 否 | essd_pl2 | Tair ESSD 磁盘型的存储类型,取值为essd_pl0、essd_pl1、essd_pl2和essd_pl3,在指定本参数时,您还需同时指定Capacity为自定义磁盘容量。更多信息请参见磁盘型实例规格。 |
| Capacity | Long | 否 | 512000 | Tair ESSD 磁盘型的磁盘容量,单位:MB。 |
参数请求示例
查询新购 Tair 云原生版集群架构的示例(该场景无需传入 Instances 参数):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.2g",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"ShardCount": 3
}
查询新购 Tair ESSD 磁盘型自定义存储类型的示例:
{
"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"}]",
}
查询新购 Tair 云原生版读写分离架构的示例:
{
"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"}]"
}
查询新购多个实例的请求示例:
{
"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"}]"
}
查询续费 Tair 云原生版集群架构的示例(该场景无需传入 Instances 参数):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.1g",
"OrderType": "RENEW",
"ChargeType": "PrePaid",
"Period": 12,
"InstanceId": "r-d7****l3v0xmorw1xp",
"ShardCount": 3
}
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| OrderParams |
string |
订单参数,当 OrderParamOut 为 |
String |
| RequestId |
string |
请求 ID。 |
3A40BE4E-1890-4972-889C-FEFA37663635 |
| Order |
object |
订单信息。 |
|
| OriginalAmount |
string |
订单原价。 |
0.21 |
| HandlingFeeAmount |
string |
手续费。 |
0.1 |
| Currency |
string |
币种,中国站为 CNY(人民币);国际站为 USD(美元)。 |
CNY |
| DiscountAmount |
string |
订单优惠金额。 |
0.21 |
| TradeAmount |
string |
订单实际交易价。 |
10 |
| Coupons |
object |
||
| Coupon |
array<object> |
优惠券信息。 |
|
|
array<object> |
优惠券信息。 |
||
| IsSelected |
string |
是否选中该优惠券。 |
true |
| CouponNo |
string |
优惠券编码。 |
youhuiquan_promotion_option_id_for_blank |
| Name |
string |
优惠券名称。 |
test |
| Description |
string |
优惠券描述。 |
coupondemo |
| Effective |
boolean |
是否可用 |
|
| ActivityExtInfo |
object |
优惠券透明化信息 |
|
| RuleIds |
object |
||
| RuleId |
array |
活动 ID。 |
|
|
string |
活动 ID。 |
[202] |
|
| ShowDiscountInfo |
boolean |
是否展示折扣信息。 |
|
| DepreciateInfo |
object |
活动信息。 |
|
| ListPrice |
integer |
目录价。 |
1* |
| OriginalStandAmount |
integer |
原始官网总价。 |
12* |
| CheapStandAmount |
integer |
降价后官网总价。 |
9* |
| CheapRate |
integer |
降价比例。 |
30% |
| Differential |
integer |
差价优惠(订单总价展示)。 |
** |
| DifferentialName |
string |
差价优惠名称。 |
XXXXX |
| MonthPrice |
integer |
折合月价。 |
** |
| IsContractActivity |
boolean |
命中合同优惠。 |
false |
| IsShow |
boolean |
是否展示降价幅度。 |
true |
| ContractActivity |
object |
活动信息。 |
|
| FinalPromFee |
number |
优惠总费用。 |
|
| FinalFee |
number |
优惠后费用。 |
|
| ProdFee |
number |
原价。 |
**** |
| ActivityId |
integer |
活动 ID。 |
**** |
| OptionCode |
string |
优惠 ID。 |
**** |
| ActivityName |
string |
活动名称。 |
合同优惠_整单_xxx折 |
| OptionIds |
object |
||
| OptionId |
array |
优惠 ID 列表。 |
|
|
integer |
优惠 ID。 |
***** |
|
| StandDiscountPrice |
integer |
折扣价格。 |
**** |
| IsContractActivity |
boolean |
命中合同优惠。 |
false |
| StandPrice |
integer |
折扣价。 |
0 |
| Code |
string |
订单码。 |
"" |
| Message |
string |
订单信息。 |
"" |
| Rules |
object |
||
| Rule |
array<object> |
活动规格。 |
|
|
object |
|||
| RuleDescId |
integer |
策略 ID。 |
1111111111 |
| Title |
string |
策略标题。 |
test |
| Name |
string |
活动名称。 |
test |
| SubOrders |
object |
||
| SubOrder |
array<object> |
优惠券对应的策略。 |
|
|
array<object> |
|||
| OriginalAmount |
string |
订单原价。 |
0.21 |
| InstanceId |
string |
实例 ID。 |
r-bp1xxxxxxxxxxxxx |
| DiscountAmount |
string |
订单优惠金额。 |
0.21 |
| TradeAmount |
string |
订单实际交易价。 |
10 |
| RuleIds |
object |
||
| RuleId |
array |
活动 ID。 |
|
|
string |
命中策略的 ID。 |
RuleId: 1111111111 |
|
| OptionalPromotions |
object |
||
| OptionalPromotion |
array<object> |
可选择的优惠选项列表结果。 |
|
|
array<object> |
|||
| Selected |
boolean |
是否外部选中。 |
false |
| CouponNo |
string |
是否使用优惠券,取值说明:
|
default |
| Name |
string |
优惠券名称。 |
**** |
| Description |
string |
备注。 |
**** |
| Show |
boolean |
优惠是否展示。 |
False |
| OptionCode |
string |
活动额外信息。 |
**** |
| PromotionName |
string |
优惠名称。 |
**** |
| PromotionOptionNo |
string |
优惠号。 |
youhuiquan_promotion_option_id_for_blank |
| CanPromFee |
string |
可优惠价格。 |
**** |
| Effective |
boolean |
是否可用 |
|
| ActivityExtInfo |
object |
活动额外信息。 |
**** |
| DepreciateInfo |
object |
降价信息。 |
|
| ListPrice |
integer |
目录价。 |
**** |
| OriginalStandAmount |
integer |
原始官网总价。 |
**** |
| CheapStandAmount |
integer |
降价后官网总价。 |
**** |
| CheapRate |
integer |
降价比例。 |
**** |
| Differential |
integer |
差价优惠(订单总价展示)。 |
**** |
| DifferentialName |
string |
差价优惠名称。 |
**** |
| MonthPrice |
integer |
折合月价。 |
**** |
| IsContractActivity |
boolean |
命中合同优惠。 |
false |
| ContractActivity |
object |
合同优惠。 |
|
| FinalPromFee |
number |
优惠总费用。 |
**** |
| FinalFee |
number |
优惠后费用。 |
**** |
| ProdFee |
number |
原价。 |
**** |
| ActivityId |
integer |
活动 id。 |
1412025702634847 |
| OptionCode |
string |
优惠 id。 |
**** |
| ActivityName |
string |
活动名称。 |
**** |
| OptionIds |
object |
||
| OptionId |
array |
优惠 ID 列表。 |
|
|
integer |
优惠 ID。 |
|
|
| StartTime |
string |
活动开始时间。 |
2024-11-18T00:00:00Z |
| StandDiscountPrice |
integer |
折扣价格。 |
**** |
| IsContractActivity |
boolean |
命中合同优惠。 |
**** |
| StandPrice |
integer |
折扣价。 |
**** |
| ModuleInstance |
object |
||
| ModuleInstance |
array<object> |
订单行实例配置。 |
|
|
array<object> |
订单行实例配置子对象。 |
||
| ModuleCode |
string |
模块 code。 |
**** |
| ModuleId |
string |
模块 Id。 |
**** |
| StandPrice |
number |
折扣价。 |
**** |
| PricingModule |
boolean |
是否计价项。 |
**** |
| ModuleName |
string |
模块名称。 |
**** |
| DiscountFee |
number |
折扣费用。 |
**** |
| TotalProductFee |
number |
产品原价。 |
0.0 |
| NeedOrderPay |
boolean |
在订单中是否需要支付。 |
true |
| PayFee |
number |
实付金额。 |
0.0 |
| ModuleAttrs |
object |
||
| moduleAttr |
array<object> |
模块属性。 |
|
|
object |
订购参数。 |
||
| Type |
integer |
属性类型。 |
**** |
| Value |
string |
属性类型。 |
**** |
| Code |
string |
属性代码。 |
**** |
| Name |
string |
属性名称。 |
**** |
| ContractActivity |
boolean |
命中合同优惠。 |
**** |
| DepreciateInfo |
object |
降价信息。 |
|
| ListPrice |
number |
目录价。 |
**** |
| OriginalStandAmount |
number |
原始官网总价。 |
**** |
| CheapStandAmount |
number |
降价后官网总价。 |
**** |
| CheapRate |
number |
降价比例。 |
****** |
| Differential |
number |
差价优惠(订单总价展示)。 |
**** |
| DifferentialName |
string |
差价优惠名称。 |
**** |
| MonthPrice |
number |
折合月价。 |
**** |
| IsContractActivity |
boolean |
命中合同优惠。 |
**** |
| IsShow |
boolean |
是否展示降价幅度。 |
true |
| StartTime |
string |
活动开始时间。 |
2024-09-23T14:00:01Z |
| PromDetailList |
object |
||
| PromDetail |
array<object> |
优惠明细信息。 |
|
|
array<object> |
优惠信息。 |
||
| PromotionName |
string |
优惠活动名称。 |
**** |
| PromotionId |
integer |
优惠 ID。 |
**** |
| FinalPromFee |
number |
优惠金额。 |
**** |
| OptionCode |
string |
优惠券代号。 |
**** |
| PromType |
string |
优惠子类型。 |
**** |
| ActivityExtInfo |
object |
活动额外信息。 |
**** |
| DerivedPromType |
string |
优惠子类型。 |
**** |
| PromotionCode |
string |
优惠码。 |
**** |
| ContractActivity |
boolean |
命中合同优惠。 |
**** |
示例
正常返回示例
JSON格式
{
"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",
"Effective": true,
"ActivityExtInfo": {
"test": "test",
"test2": 1
}
}
]
},
"RuleIds": {
"RuleId": [
"[202]"
]
},
"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": "合同优惠_整单_xxx折",
"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,
"OptionCode": "****",
"PromotionName": "****",
"PromotionOptionNo": "youhuiquan_promotion_option_id_for_blank",
"CanPromFee": "****",
"Effective": true,
"ActivityExtInfo": {
"test": "test",
"test2": 1
}
}
]
},
"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
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter | Period is mandatory for this action. | |
| 400 | InvalidInstances.Format | The Specified parameter Instances is not valid. | 传入的Instances参数是无效的 |
| 400 | AlreadyHadTemporaryBandwidth | This instance have already had temporary bandwidth, please modify instance spec first. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。