查询用户某个资源包的价格。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
bss:DescribePrice |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ProductCode |
string |
是 |
产品代码,可通过接口 QueryProductList 查询产品代码,或查看阿里云产品 Code 速查手册。 |
ossbag |
| PackageType |
string |
是 |
资源包类型。值与描述资源包接口返回的 ResourcePackage 的 Code 值相等。 |
FPT_ossbag_periodMonthlyAcc_NetworkOut_finance_common |
| EffectiveDate |
string |
否 |
资源包生效时间,不填默认立即生效。 订单类型为购买时,不支持询价生效时间大于当前时间六个月的资源包。 订单类型为升级时,生效时间必须小于等于升级的资源包实际到期时间。 日期格式按照 ISO8601 标准表示,并需要使用 UTC 时间。格式为:yyyy-MM-ddTHH:mm:ssZ。 |
2020-02-10T12:00:00Z |
| Specification |
string |
是 |
资源包规格大小。 |
500 |
| Duration |
integer |
是 |
资源包时长。值与规格大小的可用时长相符。 |
6 |
| PricingCycle |
string |
否 |
资源包时长单位。取值:
|
Month |
| OrderType |
string |
否 |
订单类型,取值:
默认值 BUY。 |
BUY |
| InstanceId |
string |
否 |
用户实例 ID。订单类型为续费、升级时,必填。 |
OSSBAG-cn-0xl0002 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Code |
string |
状态码。 |
Success |
| Message |
string |
错误信息。 |
Successful! |
| RequestId |
string |
请求 ID。 |
BBEF51A3-E933-4F40-A534-C673CBDB9C80 |
| Success |
boolean |
是否成功。 |
true |
| Data |
object |
返回数据。 |
|
| OriginalPrice |
number |
原始价格,单位元。 |
1290240 |
| DiscountPrice |
number |
折扣价格,单位元。 |
215040 |
| Currency |
string |
币种。 |
CNY |
| TradePrice |
number |
交易价格,单位元。 |
1075200 |
| Promotions |
object |
||
| Promotion |
array<object> |
优惠详情。 |
|
|
object |
|||
| Name |
string |
优惠描述。 |
购买半年,立享8.3折优惠 |
| Id |
integer |
优惠 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 |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | NotApplicable | This API is not applicable for caller. | |
| 400 | NotAuthorized | This API is not authorized for caller. | |
| 400 | MissingParameter | Absent some mandatory parameter for this request. | |
| 400 | InvalidParameter | This request contain some invalid parameter | |
| 400 | InvalidOwner | The specified owner doesn't belong to caller. | 用户身份错误 |
| 400 | DurationInvalid | Parameter duration can only be positive integer. | |
| 400 | ProductNotFound | Product not found. | |
| 400 | PackageTypeNotFound | No such resource package type found. | |
| 400 | SpecificationInvalid | Parameter specification can only be positive integer. | |
| 400 | IdInvalid | Parameter ownerId is invalid. | |
| 400 | EffectiveDateInvalid | Parameter effectiveDate is invalid. | |
| 400 | IdMissing | Paramter ownerId is missing. | |
| 400 | PackageTypeNotSupported | Package type currently is not supported. | |
| 500 | InternalError | The request processing has failed due to some unknown error. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。