Estimates resource usage of the current month.

Usage notes

You can call this operation to estimate resource usage of the current month based on the metering method set on the first day of the current month. This operation can estimate resource usage only of the current month within your Alibaba Cloud account. The time range used for the estimation starts at 00:00 on the first day of the current month and ends 2 hours earlier than the current time.

  • Pay by monthly 95th percentile: The top 5% values between the start time and end time are excluded. The highest value among the remaining values is the estimated value.
  • Pay by average daily peak bandwidth per month: Estimated value = Sum of daily peak bandwidth values/Number of days. The current day is excluded.
  • Pay by 4th peak bandwidth per month: The 4th peak bandwidth value between the start time and end time is the estimated value. If the time range is less than 4 days, the estimated value is 0.
  • Pay by average daily 95th percentile bandwidth per month: Estimated value = Sum of daily 95th percentile bandwidth values/Number of days. The current day is excluded.
  • Pay by 95th percentile bandwidth with 50% off from 00:00 to 08:00: The top 5% values between the start time and end time are excluded. The highest value among the remaining values is the estimated value.
Note The maximum number of times that each user can call this operation per second is 1.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeCdnUserBillPrediction

The operation that you want to perform. Set the value to DescribeCdnUserBillPrediction.

Dimension String Yes fiow

The billable item. A value of flow indicates bandwidth.

Area String No CN,OverSeas

The billable region. Valid values:

  • CN: Chinese mainland
  • OverSeas: outside the Chinese mainland
  • AP1: Asia Pacific 1
  • AP2: Asia Pacific 2
  • AP3: Asia Pacific 3
  • NA: North America
  • SA: South America
  • EU: Europe
  • MEAA: Middle East and Africa

The default value is the current metering method. Regions inside and outside the Chinese mainland are classified into the CN or OverSeas billable regions. Billable regions inside the Chinese mainland include CN. Billable regions outside the Chinese mainland include AP1, AP2, AP3, NA, SA, EU, and MEAA.

Note For more information about billable regions, see Billable regions.
StartTime String No 2018-09-30T16:00:00Z

The default value is 00:00 on the first day of the current month. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.

EndTime String No 2018-10-25T10:00:00Z

The default value is the current time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.

Note The end time must be later than the start time.

Response parameters

Parameter Type Example Description
EndTime String 2018-10-25T10:00:00Z

The end time of the estimation.

StartTime String 2018-09-30T16:00:00Z

The start time of the estimation.

RequestId String C370DAF1-C838-4288-A1A0-9A87633D248E

The ID of the request.

BillType String month_95_overseas

The metering method.

Note If the metering method ends with _overseas, it indicates that the billable region is outside the Chinese mainland. For example, BillType": "month_avg_day_bandwidth_overseas specifies a billable region outside the Chinese mainland and that the metering method is pay by daily peak bandwidth per month.

Valid values:

  • hour_flow: pay by hourly data transfer.
  • day_bandwidth: pay by daily bandwidth.
  • month_95: pay by monthly 95th percentile bandwidth.
  • month_avg_day_bandwidth: pay by average daily peak bandwidth per month.
  • month_4th_day_bandwidth: pay by 4th peak bandwidth per month.
  • month_avg_day_95: pay by average daily 95th percentile bandwidth per month.
  • month_95_night_half: pay by 95th percentile bandwidth with 50% off from 00:00 to 08:00.
  • hour_vas: pay by value-added services on an hourly basis.
  • day_count: pay by the number of requests per day.
BillPredictionData Array of BillPredictionDataItem
BillPredictionDataItem
Value Float 10000

The estimated value.

TimeStp String 2018-10-15T16:00:00Z

The time when the value used as the estimated value is generated. This field is returned only if the metering method is pay by 95th percentile, pay by 95th percentile bandwidth with 50% off from 00:00 to 08:00, or pay by 4th peak bandwidth per month.

Area String CN

The billable region.

Examples

Sample requests

http(s)://cdn.aliyuncs.com?Action=DescribeCdnUserBillPrediction
&Dimension=fiow
&Area=CN,OverSeas
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeCdnUserBillPredictionResponse>
<RequestId>C370DAF1-C838-4288-A1A0-9A87633D248E</RequestId>
<StartTime>2018-09-30T16:00:00Z</StartTime>
<EndTime>2018-10-25T10:00:00Z</EndTime>
<BillType>month_95_overseas</BillType>
<BillPredictionData>
    <BillPredictionDataItem>
        <Value>10000</Value>
        <Area>CN</Area>
        <TimeStp>2018-10-15T16:00:00Z</TimeStp>
    </BillPredictionDataItem>
    <BillPredictionDataItem>
        <Value>5000</Value>
        <Area>OverSeas</Area>
        <TimeStp>2018-10-10T:00:00Z</TimeStp>
    </BillPredictionDataItem>
</BillPredictionData>
</DescribeCdnUserBillPredictionResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "C370DAF1-C838-4288-A1A0-9A87633D248E",
  "StartTime" : "2018-09-30T16:00:00Z",
  "EndTime" : "2018-10-25T10:00:00Z",
  "BillType" : "month_95_overseas",
  "BillPredictionData" : {
    "BillPredictionDataItem" : [ {
      "Value" : 10000,
      "Area" : "CN",
      "TimeStp" : "2018-10-15T16:00:00Z"
    }, {
      "Value" : 5000,
      "Area" : "OverSeas",
      "TimeStp" : "2018-10-10T:00:00Z"
    } ]
  }
}

Error codes

HttpCode Error code Error message Description
400 InvalidTimeRange Invalid StartTime and EndTime range. The error message returned because the specified start time and end time are invalid.

For a list of error codes, visit the API Error Center.