查询资源的价格信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
appstreaming:GetResourcePrice |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| NodeInstanceType |
string |
否 |
购买资源的规格类型 ID,可通过 ListNodeInstanceType 接口获取。 AppInstanceType 与 NodeInstanceType 其中一个必须有值。若两个都有值则使用 NodeInstanceType。 枚举值:
|
appstreaming.vgpu.4c8g.2g |
| ProductType |
string |
是 |
产品类型。 枚举值:
|
CloudApp |
| ChargeType |
string |
是 |
付费方式。 枚举值:
|
PrePaid |
| Period |
integer |
是 |
资源购买时长的数量部分,与 |
1 |
| PeriodUnit |
string |
是 |
资源购买时长的单位部分,与
说明
该参数区分大小写。例如, 枚举值:
|
Week |
| Amount |
integer |
是 |
购买资源的数量。 |
1 |
| BizRegionId |
string |
是 |
交付组所属的地域 ID。关于支持的地域详情,请参见使用限制。 枚举值:
|
cn-hangzhou |
| AppInstanceType |
string |
否 |
购买会话的规格类型 ID,可通过 AppInstanceType 与 NodeInstanceType 其中一个必须有值。若两个都有值则使用 NodeInstanceType。 |
appstreaming.general |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回信息集合。 |
||
| RequestId |
string |
请求 ID。 |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| Code |
string |
出错时的错误码。 |
InvalidParameter.ProductType |
| Message |
string |
出错时的错误消息。 |
The parameter ProductType is invalid. |
| PriceModel |
object |
价格对象。 请求参数 NodeInstanceType 有值时返回此参数。 |
|
| Price |
object |
价格详情。 |
|
| OriginalPrice |
string |
原价。 |
11.00 |
| DiscountPrice |
string |
折减的价格,原价减去折减的价格即为实际价格。 |
1.00 |
| TradePrice |
string |
实际价格,原价减去折减的价格即为实际价格。 |
10.00 |
| Currency |
string |
币种。 |
CNY |
| Promotions |
array<object> |
优惠券元数据。 |
|
|
object |
优惠券元数据。 |
||
| OptionCode |
string |
优惠券代号。 |
coupon**** |
| PromotionId |
string |
优惠券 ID。 |
17440009**** |
| PromotionName |
string |
优惠券名称。 |
**优惠 |
| PromotionDesc |
string |
优惠券描述。 |
**活动期间的优惠 |
| Selected |
boolean |
是否选用优惠券。 枚举值:
|
true |
| Rules |
array<object> |
价格计算规则。 |
|
|
object |
价格计算规则。 |
||
| RuleId |
integer |
价格计算规则 ID。 |
102002100393**** |
| Description |
string |
价格计算规则描述。 |
用户优惠 |
| PriceList |
array<object> |
价格对象列表。 请求参数 AppInstanceType 有值时返回此参数。 |
|
|
array<object> |
价格对象。 |
||
| PriceType |
string |
价格类型。 枚举值:
|
Standby |
| Price |
object |
价格详情。 |
|
| OriginalPrice |
string |
原价。 |
6700 |
| DiscountPrice |
string |
折减的价格,原价减去折减的价格即为实际价格。 |
999.0 |
| TradePrice |
string |
实际价格,原价减去折减的价格即为实际价格。 |
5278.0 |
| Currency |
string |
币种。 |
CNY |
| Promotions |
array<object> |
优惠券元数据。 |
|
|
object |
优惠券元数据。 |
||
| OptionCode |
string |
优惠券代号。 |
coupon**** |
| PromotionId |
string |
优惠券 ID。 |
1847709**** |
| PromotionName |
string |
优惠券名称。 |
**优惠 |
| PromotionDesc |
string |
优惠券描述。 |
**活动期间的优惠 |
| Selected |
boolean |
是否选用优惠券。 枚举值:
|
true |
| Rules |
array<object> |
价格计算规则。 |
|
|
object |
价格计算规则。 |
||
| RuleId |
integer |
价格计算规则 ID。 |
260904273633**** |
| Description |
string |
价格计算规则描述。 |
用户优惠。 |
示例
正常返回示例
JSON格式
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"Code": "InvalidParameter.ProductType",
"Message": "The parameter ProductType is invalid.",
"PriceModel": {
"Price": {
"OriginalPrice": "11.00",
"DiscountPrice": "1.00",
"TradePrice": "10.00",
"Currency": "CNY",
"Promotions": [
{
"OptionCode": "coupon****",
"PromotionId": "17440009****",
"PromotionName": "**优惠",
"PromotionDesc": "**活动期间的优惠",
"Selected": true
}
]
},
"Rules": [
{
"RuleId": 0,
"Description": "用户优惠"
}
]
},
"PriceList": [
{
"PriceType": "Standby",
"Price": {
"OriginalPrice": "6700",
"DiscountPrice": "999.0",
"TradePrice": "5278.0",
"Currency": "CNY",
"Promotions": [
{
"OptionCode": "coupon****",
"PromotionId": "1847709****",
"PromotionName": "**优惠",
"PromotionDesc": "**活动期间的优惠",
"Selected": true
}
]
},
"Rules": [
{
"RuleId": 0,
"Description": "用户优惠。"
}
]
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。