Queries the price information of a resource.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:GetResourcePrice |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NodeInstanceType |
string |
No |
The ID of the resource instance type to purchase. You can call the ListNodeInstanceType operation to obtain the ID. Either AppInstanceType or NodeInstanceType must have a value. If both have values, NodeInstanceType is used. Valid values:
|
appstreaming.vgpu.4c8g.2g |
| ProductType |
string |
Yes |
The product type. Valid values:
|
CloudApp |
| ChargeType |
string |
Yes |
The billing method. Valid values:
|
PrePaid |
| Period |
integer |
Yes |
The numeric part of the purchase duration. This parameter is used together with PeriodUnit to specify the complete purchase duration. |
1 |
| PeriodUnit |
string |
Yes |
The unit part of the purchase duration. This parameter is used together with Period to specify the complete purchase duration. The following combinations of Period and PeriodUnit are supported:
Note
This parameter is case-sensitive. For example, Valid values:
|
Week |
| Amount |
integer |
Yes |
The quantity of resources to purchase. |
1 |
| BizRegionId |
string |
Yes |
The region ID of the delivery group. For more information about supported regions, see Limits. Valid values:
|
cn-hangzhou |
| AppInstanceType |
string |
No |
The ID of the session instance type to purchase. You can call the Either AppInstanceType or NodeInstanceType must have a value. If both have values, NodeInstanceType is used. |
appstreaming.general |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| Code |
string |
The error code returned when an error occurs. |
InvalidParameter.ProductType |
| Message |
string |
The error message returned when an error occurs. |
The parameter ProductType is invalid. |
| PriceModel |
object |
The price object. This parameter is returned when the request parameter NodeInstanceType has a value. |
|
| Price |
object |
The price details. |
|
| OriginalPrice |
string |
The original price. |
11.00 |
| DiscountPrice |
string |
The discount. The actual price is calculated based on the following formula: Actual price = Original price - Discount. |
1.00 |
| TradePrice |
string |
The actual price. The actual price is calculated based on the following formula: Actual price = Original price - Discount. |
10.00 |
| Currency |
string |
The currency type. |
CNY |
| Promotions |
array<object> |
The coupon metadata. |
|
|
object |
|||
| OptionCode |
string |
The coupon code. |
coupon**** |
| PromotionId |
string |
The coupon ID. |
17440009**** |
| PromotionName |
string |
The coupon name. |
**优惠 |
| PromotionDesc |
string |
The coupon description. |
**活动期间的优惠 |
| Selected |
boolean |
Indicates whether the coupon was used. Valid values:
Valid values:
|
true |
| Rules |
array<object> |
The pricing rules. |
|
|
object |
The pricing rules. |
||
| RuleId |
integer |
The ID of the price calculation rule. |
102002100393**** |
| Description |
string |
The description of the price calculation rule. |
用户优惠 |
| PriceList |
array<object> |
The list of price objects. This parameter is returned when the request parameter AppInstanceType has a value. |
|
|
array<object> |
The price object. |
||
| PriceType |
string |
The price type. Valid values:
|
Standby |
| Price |
object |
The price details. |
|
| OriginalPrice |
string |
The original price. |
6700 |
| DiscountPrice |
string |
The discount. The actual price is calculated based on the following formula: Actual price = Original price - Discount. |
999.0 |
| TradePrice |
string |
The actual price. The actual price is calculated based on the following formula: Actual price = Original price - Discount. |
5278.0 |
| Currency |
string |
The currency type. |
CNY |
| Promotions |
array<object> |
The coupon metadata. |
|
|
object |
|||
| OptionCode |
string |
The coupon code. |
coupon**** |
| PromotionId |
string |
The coupon ID. |
1847709**** |
| PromotionName |
string |
The coupon name. |
**优惠 |
| PromotionDesc |
string |
The coupon description. |
**活动期间的优惠 |
| Selected |
boolean |
Indicates whether the coupon was used. Valid values:
Valid values:
|
true |
| Rules |
array<object> |
The pricing rules. |
|
|
object |
The pricing rules. |
||
| RuleId |
integer |
The ID of the price calculation rule. |
260904273633**** |
| Description |
string |
The description of the price calculation rule. |
用户优惠。 |
Examples
Success response
JSON format
{
"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": "用户优惠。"
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.