文档

GetResourcePrice - 查询资源价格

查询资源的价格信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
appstreaming:GetResourcePriceRead
  • 全部资源
    *

请求参数

名称类型必填描述示例值
NodeInstanceTypestring

购买资源的规格类型 ID,可通过 ListNodeInstanceType 接口获取。

AppInstanceType 与 NodeInstanceType 其中一个必须有值。若两个都有值则使用 NodeInstanceType。

枚举值:
  • appstreaming.vgpu.8c16g.4g无影-图形型_8核16G 4G显存
  • appstreaming.general.8c16g无影-通用型_8核16G
  • appstreaming.general.4c8g无影-通用型_4核8G
  • appstreaming.vgpu.14c93g.12g无影-图形型_14核93G 12G显存
  • appstreaming.vgpu.8c31g.16g无影-图形型_8核31G 16G显存
appstreaming.vgpu.4c8g.2g
ProductTypestring

产品类型。

枚举值:
  • CloudApp无影云应用
CloudApp
ChargeTypestring

付费方式。

枚举值:
  • PostPaid按量付费
  • PrePaid包年包月
PrePaid
Periodlong

资源购买时长的数量部分,与PeriodUnit一起表示完整的购买时长。

1
PeriodUnitstring

资源购买时长的单位部分,与Period一起表示完整的购买时长。可使用的PeriodPeriodUnit的搭配如下:

  • 1 Week(1 周)
  • 1 Month(1 个月)
  • 2 Month(2 个月)
  • 3 Month(3 个月)
  • 6 Month(6 个月)
  • 1 Year(1 年)
  • 2 Year(2 年)
  • 3 Year(3 年)
说明 该参数区分大小写。例如,Week是有效的,week是无效的。另外,如果请求参数不符合上述搭配,例如2 Week,虽然调用本接口会成功,但最终在下单阶段会出错。
Week
Amountlong

购买资源的数量。

1
BizRegionIdstring

交付组所属的地域 ID。关于支持的地域详情,请参见使用限制

枚举值:
  • cn-shanghai华东2(上海)
  • cn-hangzhou华东1(杭州)
cn-hangzhou
AppInstanceTypestring

购买会话的规格类型 ID,可通过ListAppInstanceType接口获取。

AppInstanceType 与 NodeInstanceType 其中一个必须有值。若两个都有值则使用 NodeInstanceType。

appstreaming.general

返回参数

名称类型描述示例值
object

返回信息集合。

RequestIdstring

请求 ID。

1CBAFFAB-B697-4049-A9B1-67E1FC5F****
Codestring

出错时的错误码。

InvalidParameter.ProductType
Messagestring

出错时的错误消息。

The parameter ProductType is invalid.
PriceModelobject

价格对象。

请求参数 NodeInstanceType 有值时返回此参数。

Priceobject

价格详情。

OriginalPricestring

原价。

11.00
DiscountPricestring

折减的价格,原价减去折减的价格即为实际价格。

1.00
TradePricestring

实际价格,原价减去折减的价格即为实际价格。

10.00
Currencystring

币种。

CNY
Promotionsobject []

优惠券元数据。

OptionCodestring

优惠券代号。

coupon****
PromotionIdstring

优惠券 ID。

17440009****
PromotionNamestring

优惠券名称。

**优惠
PromotionDescstring

优惠券描述。

**活动期间的优惠
Selectedboolean

是否选用优惠券。

枚举值:
  • true选用
  • false不选用
true
Rulesobject []

价格计算规则。

RuleIdlong

价格计算规则 ID。

102002100393****
Descriptionstring

价格计算规则描述。

用户优惠
PriceListobject []

价格对象列表。

请求参数 AppInstanceType 有值时返回此参数。

PriceTypestring

价格类型。

枚举值:
  • Connected使用阶段
  • Standby预开阶段
Standby
Priceobject

价格详情。

OriginalPricestring

原价。

6700
DiscountPricestring

折减的价格,原价减去折减的价格即为实际价格。

999.0
TradePricestring

实际价格,原价减去折减的价格即为实际价格。

5278.0
Currencystring

币种。

CNY
Promotionsobject []

优惠券元数据。

OptionCodestring

优惠券代号。

coupon****
PromotionIdstring

优惠券 ID。

1847709****
PromotionNamestring

优惠券名称。

**优惠
PromotionDescstring

优惠券描述。

**活动期间的优惠
Selectedboolean

是否选用优惠券。

枚举值:
  • true选用
  • false不选用
true
Rulesobject []

价格计算规则。

RuleIdlong

价格计算规则 ID。

260904273633****
Descriptionstring

价格计算规则描述。

用户优惠。

示例

正常返回示例

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": "用户优惠。"
        }
      ]
    }
  ]
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-05-12OpenAPI 入参发生变更、OpenAPI 返回结构发生变更看变更集
变更项变更内容
入参OpenAPI 入参发生变更
    新增入参:AppInstanceType
出参OpenAPI 返回结构发生变更
  • 本页导读 (0)
文档反馈