查询资源账单列表
1. 接口描述
调用 DescribeResourceBills 接口查询资源指定账期内的账单列表。
2. 请求参数
名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Action | String | 是 | 固定取值:DescribeResourceBills |
BillDate | String | 否 | 账单时间,格式为:yyyy-MM。 |
ProductType | String | 否 | 产品类型, 取值参考枚举:产品类型 |
BillStatus | String | 否 | 账单状态,取值范围: CLEARED 已结清, UNCLEAR 未结清 |
PageNumber | integer | 否 | 资源账单列表的页码。 起始值:1 默认值:1 |
PageSize | integer | 否 | 分页查询时设置的每页行数。 最大值:50 默认值:10 |
3. 返回数据
名称 | 类型 | 说明 |
---|---|---|
Items | Array[ ResourceBillInfo ] | 资源账单列表 |
RequestId | String | 请求ID |
Total | Integer | 资源账单总数 |
ResourceMonthConsumption | String | 资源月消耗量json字符串 |
4. 示例
请求示例
https://openapi.kaopuyun.com/?AccessKeyId=sz0000ei53aw
&Action=DescribeResourceBills
&Format=JSON
&BillDate=2023-02
&SignatureMethod=HMAC-SHA1
&SignatureNonce=76a5d5e7-0992-462d-9a26-916650eca00f
&SignatureVersion=1.0
&Timestamp=2023-03-09T07%3A33%3A56Z
&Version=2014-05-26
&Signature=LH5UYKO7k%2FeQlyLH3p169uyRKyU%3D
&ProductType=OWN_ECS
&PageNumber=1
&PageSize=10
正常返回实例
{
"Total":202,
"ResourceMonthConsumption":" {\"Nat\":2986.510000,\"P2PConnect\":17257.740000,\"CdsMysql\":275.200000,\"OwnEcs\":1176.060000,\"CdsRedis\":294.000000,\"OwnDisk\":5.580000,\"OwnEip\":1169.860000,\"Slb\":2417.170000,\"Dadp\":116709.670000,\"Incf\":7000.000000,\"Dads\":2900.000000,\"Inas\":200.000000,\"ExclusiveBwp\":3511.290000,\"Total\":1033823.040000,\"GlobalAccel\":1476.450000,\"Bwp\":876437.510000,\"LiteEcs\":6.000000}",
"Items":[
{
"PayPrice":4833.33,
"RegionCode":"demo-1",
"ResourceName":"20220902170004001",
"ProductType":"BWP",
"BillStatus":"CLEARED",
"ResourceUUID":"bwp-2w000004ircm"
},{
"PayPrice":6411.33,
"RegionCode":"demo-1",
"ResourceName":"1",
"ProductType":"BWP",
"BillStatus":"CLEARED",
"ResourceUUID":"bwp-9p0000019p2l"
},{
"PayPrice":28.33,
"RegionCode":"demo-1",
"ResourceName":"作废",
"ProductType":"BWP",
"BillStatus":"CLEARED",
"ResourceUUID":"bwp-9z000004sy1r"
}
],
"RequestId":"742fbe80-0ea9-11eb-9b36-0208cb7f7896"
}
5. 错误码
错误码 | 错误信息 |
---|---|
DescribeResourceBillsFail | 查询资源账单列表失败:xxx |
ProductTypeIsInvalid | ProductType 无效的产品类型 |
ValueNotSupported | BillStatus 参数不合法 |