调用DescribeCdnUserBillHistory查询用户历史账单。
接口说明
最多查询一个月内的数据。
单用户调用频率:100 次/秒。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cdn:DescribeCdnUserBillHistory |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| StartTime |
string |
是 |
获取历史账单起始时间点。日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 最小数据粒度为 5 分钟。 |
2018-09-30T16:00:00Z |
| EndTime |
string |
是 |
获取历史账单结束时间点。日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 结束时间需大于起始时间。 |
2018-10-31T16:00:00Z |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
ED61C6C3-8241-4187-AAA7-5157AE175CEC |
| BillHistoryData |
object |
||
| BillHistoryDataItem |
array<object> |
历史计费数据。 |
|
|
array<object> |
|||
| Dimension |
string |
维度。 |
flow |
| BillType |
string |
计费模式。 |
month_4th_day_bandwidth |
| BillTime |
string |
计费周期起始时间。 |
2018-09-30T16:00:00Z |
| BillingData |
object |
||
| BillingDataItem |
array<object> |
计费数据。 |
|
|
object |
|||
| Flow |
number |
流量,单位为字节。 |
24567 |
| Bandwidth |
number |
带宽,单位为 Bps。 |
4041 |
| Count |
number |
请求个数,单位为个。 |
203601 |
| CdnRegion |
string |
计费大区。取值:
|
AP1 |
| ChargeType |
string |
计费类型。取值:
|
DynamicHttp |
示例
正常返回示例
JSON格式
{
"RequestId": "ED61C6C3-8241-4187-AAA7-5157AE175CEC",
"BillHistoryData": {
"BillHistoryDataItem": [
{
"Dimension": "flow",
"BillType": "month_4th_day_bandwidth",
"BillTime": "2018-09-30T16:00:00Z",
"BillingData": {
"BillingDataItem": [
{
"Flow": 24567,
"Bandwidth": 4041,
"Count": 203601,
"CdnRegion": "AP1",
"ChargeType": "DynamicHttp"
}
]
}
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | 参数错误 |
| 400 | InvalidStartTime.Malformed | The specified value of parameter StartTime is malformed. | |
| 400 | InvalidEndTime.Malformed | The specified value of parameter EndTime is malformed. | |
| 400 | InvalidTime.Malformed | Specified StartTime or EndTime is malformed. | 开始时间或结束时间格式错误。 |
| 400 | InvalidEndTime.Mismatch | Specified EndTime does not match the specified StartTime. | 指定的EndTime与StartTime不匹配,StartTime应早于EndTime。 |
| 400 | InvalidTimeSpan | The time span exceeds the limit. | 时间跨度超过限制,请参照接口文档,配置合理查询跨度。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。