GetResourcePrice - 查询资源价格

更新时间:
复制 MD 格式

查询资源的价格信息。

调试

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

调试

授权信息

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

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

appstreaming:GetResourcePrice

get

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

NodeInstanceType

string

购买资源的规格类型 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

ProductType

string

产品类型。

枚举值:

  • CloudApp :

    无影云应用

CloudApp

ChargeType

string

付费方式。

枚举值:

  • PostPaid :

    按量付费

  • PrePaid :

    包年包月

PrePaid

Period

integer

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

1

PeriodUnit

string

资源购买时长的单位部分,与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,虽然调用本接口会成功,但最终在下单阶段会出错。

枚举值:

  • Month :

  • Year :

  • Week :

Week

Amount

integer

购买资源的数量。

1

BizRegionId

string

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

枚举值:

  • cn-shanghai :

    华东 2(上海)

  • cn-hangzhou :

    华东 1(杭州)

cn-hangzhou

AppInstanceType

string

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

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 :

    选用

  • false :

    不选用

true

Rules

array<object>

价格计算规则。

object

价格计算规则。

RuleId

integer

价格计算规则 ID。

102002100393****

Description

string

价格计算规则描述。

用户优惠

PriceList

array<object>

价格对象列表。

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

array<object>

价格对象。

PriceType

string

价格类型。

枚举值:

  • Connected :

    使用阶段

  • Standby :

    预开阶段

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 :

    选用

  • false :

    不选用

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

错误码

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

变更历史

更多信息,参考变更详情