调用DescribeCdnUserBillPrediction预测用户当月的用量数据。
接口说明
用于预测用户当月的用量数据,按用户月初第一天的计费模式计算,只支持月度计费模式的预测,只支持用户粒度。 起始时间为月初 1 号 0 点,结束时间为当前时间前两个小时。
月 95:开始时间至结束时间内,去掉最高 5%点后的最高点,为预测值。
月均日峰值:每日峰值带宽求和/时间天数,不计算当天的数据。
月第四日峰值:请求时间内,第四高的峰值为预测值,如果请求时间小于 4 天,返回预测值为 0。
月均日 95:每日日 95 峰值求和/时间天数,不计算当天的数据。
夜间半价 95:开始时间至结束时间内,去掉最高 5%点后的最高点,为预测值。
单用户调用频率:1 次/秒。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cdn:DescribeCdnUserBillPrediction |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| StartTime |
string |
否 |
默认为月初第一天的零点整, 日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为:yyyy-MM-ddTHH:mm:ssZ。 |
2018-09-30T16:00:00Z |
| EndTime |
string |
否 |
默认为当前时间, 日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为:yyyy-MM-ddTHH:mm:ssZ。 说明
结束时间需大于起始时间。 |
2018-10-25T10:00:00Z |
| Dimension |
string |
否 |
获取计费类型的维度,flow 表示流量带宽。 |
flow |
| Area |
string |
否 |
计费大区。取值:
默认按用户当前计费模式决定,如果是海外分大区则为 CN,OverSeas,否则为 CN,AP1,AP2,AP3,NA,SA,EU 或 MEAA。 说明
各区域包含的具体国家地区,请参见计费概述。 |
CN,OverSeas |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| EndTime |
string |
预测结束时间。 |
2018-10-25T10:00:00Z |
| StartTime |
string |
预测开始时间。 |
2018-09-30T16:00:00Z |
| RequestId |
string |
请求 ID。 |
C370DAF1-C838-4288-A1A0-9A87633D248E |
| BillType |
string |
用户计费类型。 说明
带_overseas后缀表示海外不分大区计费,例如: "BillType": "month_avg_day_bandwidth_overseas" 则表明该计费方式为月均日峰值海外不分区计费。 计费模式取值如下所示:
|
month_95_overseas |
| BillPredictionData |
object |
||
| BillPredictionDataItem |
array<object> |
账单预测数据。 |
|
|
object |
|||
| Value |
number |
预测值。 |
10000 |
| TimeStp |
string |
预测值对应的时刻,仅 95、夜间半价 95 和月第四日峰值有这个字段。 |
2018-10-15T16:00:00Z |
| Area |
string |
计费大区。 |
CN |
示例
正常返回示例
JSON格式
{
"EndTime": "2018-10-25T10:00:00Z",
"StartTime": "2018-09-30T16:00:00Z",
"RequestId": "C370DAF1-C838-4288-A1A0-9A87633D248E",
"BillType": "month_95_overseas",
"BillPredictionData": {
"BillPredictionDataItem": [
{
"Value": 10000,
"TimeStp": "2018-10-15T16:00:00Z",
"Area": "CN"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | 参数错误 |
| 400 | BillTypeNotFound | The user billing type is not found or the billing type of this user is not the monthly billing type. | 用户账单类型不存在或不是月账单类型用户 |
| 400 | InvalidStartTime.Malformed | The specified value of parameter StartTime is malformed. | |
| 400 | InvalidEndTime.Malformed | The specified value of parameter EndTime is malformed. | |
| 400 | InvalidStartTime.ValueNotSupported | The specified value of parameter StartTime is not supported. | |
| 400 | InvalidTime.Malformed | Specified Time 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. | 时间跨度超过限制,请参照接口文档,配置合理查询跨度。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。