文档

GetResourcePackagePrice - 资源包产品询价服务

更新时间:
一键部署

查询用户某个资源包的价格。

调试

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

授权信息

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

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

请求参数

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

产品代码,可通过接口 QueryProductList 查询产品代码,或查看阿里云产品 Code 速查手册

ossbag
PackageTypestring

资源包类型。值与描述资源包接口返回的 ResourcePackage 的 Code 值相等。

FPT_ossbag_periodMonthlyAcc_NetworkOut_finance_common
EffectiveDatestring

资源包生效时间,不填默认立即生效。日期格式按照 ISO8601 标准表示,并需要使用 UTC 时间。格式为:yyyy-MM-ddTHH:mm:ssZ。

2020-02-10T12:00:00Z
Specificationstring

资源包规格大小。

500
Durationinteger

资源包时长。值与规格大小的可用时长相符。

6
PricingCyclestring

资源包时长单位。取值:

  • Month:月。
  • Year:年。
Month
OrderTypestring

订单类型,取值:

  • BUY:新购。
  • UPGRADE:升级。
  • RENEW:续费。

默认值 BUY。

BUY
InstanceIdstring

用户实例 ID。

OSSBAG-cn-0xl0002

返回参数

名称类型描述示例值
object
Codestring

状态码。

Success
Messagestring

错误信息。

Successful!
RequestIdstring

请求 ID。

BBEF51A3-E933-4F40-A534-C673CBDB9C80
Successboolean

是否成功。

true
Dataobject

返回数据。

OriginalPricefloat

原始价格,单位元。

1290240
DiscountPricefloat

折扣价格,单位元。

215040
Currencystring

币种。

CNY
TradePricefloat

交易价格,单位元。

1075200
Promotionsobject []

优惠详情。

Namestring

优惠描述。

购买半年,立享8.3折优惠
Idlong

优惠 ID。

1000680914

示例

正常返回示例

JSON格式

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "BBEF51A3-E933-4F40-A534-C673CBDB9C80",
  "Success": true,
  "Data": {
    "OriginalPrice": 1290240,
    "DiscountPrice": 215040,
    "Currency": "CNY",
    "TradePrice": 1075200,
    "Promotions": {
      "Promotion": [
        {
          "Name": "购买半年,立享8.3折优惠",
          "Id": 1000680914
        }
      ]
    }
  }
}

错误码

HTTP status code错误码错误信息描述
400NotApplicableThis API is not applicable for caller.-
400NotAuthorizedThis API is not authorized for caller.-
400MissingParameterAbsent some mandatory parameter for this request.-
400InvalidParameterThis request contain some invalid parameter-
400InvalidOwnerThe specified owner doesn't belong to caller.用户身份错误
400DurationInvalidParameter duration can only be positive integer.-
400ProductNotFoundProduct not found.-
400PackageTypeNotFoundNo such resource package type found.-
400SpecificationInvalidParameter specification can only be positive integer.-
400IdInvalidParameter ownerId is invalid.-
400EffectiveDateInvalidParameter effectiveDate is invalid.-
400IdMissingParamter ownerId is missing.-
400PackageTypeNotSupportedPackage type currently is not supported.-
500InternalErrorThe request processing has failed due to some unknown error.内部服务器错误。

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

  • 本页导读 (0)
文档反馈