Retrieves the bill prediction for a live streaming user.
Operation description
This operation predicts your usage data for the current month. The prediction is based on the billing method that is active on the first day of the month. This operation supports predictions for monthly billing methods only and provides data at the user level. The query time range starts at 00:00 on the first day of the month and ends two hours before the current time.
-
Monthly 95th percentile: The highest data point after the top 5% of data points are removed from the specified time range.
-
Monthly average of daily peak bandwidth: The sum of daily peak bandwidth values divided by the number of days in the time range. The current day's data is not included.
-
Monthly 4th peak: The fourth-highest peak bandwidth in the specified time range. If the time range is less than four days, the predicted value is 0.
-
Monthly average of daily 95th percentile peak: The sum of daily 95th percentile peak values divided by the number of days in the time range. The current day's data is not included.
-
Nightly 95th percentile: The highest data point after the top 5% of data points are removed from the specified time range.
QPS limit
The queries per second (QPS) limit for a single user is 1. If you exceed this limit, your API calls are throttled, which may affect your business. Make API calls at a reasonable rate. For more information, see QPS limits.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:DescribeLiveUserBillPrediction |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| StartTime |
string |
No |
The start time. The time must be in UTC and follow the yyyy-mm-ddThh:mm:ssZ format. |
2015-12-01T05:40:00Z |
| EndTime |
string |
No |
The end time. The time must be in UTC and follow the yyyy-MM-ddTHH:mm:ssZ format. |
2015-12-01T05:45:00Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| EndTime |
string |
The end time of the query. The time is in UTC and follows the ISO 8601 standard. Format: YYYY-MM-DDThh:mm:ssZ. The default value is the current time. |
2018-10-25T10:00:00Z |
| StartTime |
string |
The start time of the query. The time is in UTC and follows the ISO 8601 standard. Format: YYYY-MM-DDThh:mm:ssZ. The default value is 00:00 on the first day of the month. |
2018-09-30T16:00:00Z |
| RequestId |
string |
The request ID. |
B95BE680-5A6A-1CAD-8AB1-09DFF5D6**** |
| BillType |
string |
The billing method. The following billing methods are supported:
|
day_bandwidth |
| BillPredictionData |
object |
||
| BillPredictionDataItem |
array<object> |
The bill prediction data. |
|
|
object |
The bill prediction data. |
||
| Value |
number |
The predicted value. |
10000 |
| TimeStp |
string |
The timestamp of the predicted value. This parameter is returned only for the month_95, month_95_night_half, and month_4th_day_bandwidth billing methods. |
2018-10-15T16:00:00Z |
| Area |
string |
The region code. Valid values:
If you do not specify this parameter, data from all regions is aggregated and returned. |
CN |
Examples
Success response
JSON format
{
"EndTime": "2018-10-25T10:00:00Z",
"StartTime": "2018-09-30T16:00:00Z",
"RequestId": "B95BE680-5A6A-1CAD-8AB1-09DFF5D6****",
"BillType": "day_bandwidth",
"BillPredictionData": {
"BillPredictionDataItem": [
{
"Value": 10000,
"TimeStp": "2018-10-15T16:00:00Z",
"Area": "CN"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | InvalidParameter. | |
| 400 | InvalidStartTime.Malformed | The specified StartTime parameter is invalid. | |
| 400 | InvalidEndTime.Malformed | The specified EndTime is invalid. | |
| 400 | InvalidStartTime.ValueNotSupported | The StartTime cannot exceed 31 days before the current time. | |
| 400 | InvalidTime.Malformed | Specified Time is malformed. | Invalid time. Check whether the time that you specified is correct. |
| 400 | InvalidEndTime.Mismatch | Specified end time does not math the specified start time. | The end time does not match the start time. Make sure that the start and end times match. |
| 400 | InvalidTimeSpan | The time span exceeds the limit. | The time span exceeds the limit. Please refer to the API documentation to specify a reasonable time span. |
| 400 | BillTypeNotFound | User bill type not found or is not monthly bill type. | The bill type does not exist, or your account does not support monthly bills. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.