Queries the billing records for your account. The maximum time range that you can specify for each request is a month.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDcdnUserBillHistory |
The operation that you want to perform. Set the value to DescribeDcdnUserBillHistory. |
StartTime | String | Yes | 2018-09-30T16:00:00Z |
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. The minimum data collection interval is 5 minutes. |
EndTime | String | Yes | 2018-10-31T16:00:00Z |
The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The end time must be later than the start time. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
BillHistoryData | Array of BillHistoryDataItem |
The billing records. |
|
BillHistoryDataItem | |||
BillTime | String | 2018-09-30T17:00:00Z |
The start time of the billing cycle. |
BillType | String | month_4th_day_bandwidth |
The billing method. |
BillingData | Array of BillingDataItem |
The billing data. |
|
BillingDataItem | |||
Bandwidth | Float | 4839 |
The bandwidth. Unit: bit/s. |
CdnRegion | String | AP1 |
The region for which the billing records are generated. Valid values: CN, OverSeas, AP1, AP2, AP3, NA, SA, EU, and MEAA. |
ChargeType | String | DynamicHttp |
The billing type. Valid values: StaticHttp, DynamicHttp, and DynamicHttps. |
Count | Float | 205624 |
The number of billing entries. |
Flow | Float | 2456 |
The traffic. Unit: byte. |
Dimension | String | vas |
The dimension. |
RequestId | String | ED61C6C3-8241-4187-AAA7-5157AE175CEC |
The ID of the request. |
Examples
Sample requests
http://dcdn.aliyuncs.com/?Action=DescribeDcdnUserBillHistory
&StartTime=2018-09-30T16:00:00Z
&EndTime=2018-10-31T16:00:00Z
&<Common request parameters>
Sample success responses
XML
format
<DescribeDcdnUserBillHistoryResponse>
<BillHistoryData>
<BillHistoryDataItem>
<BillType>month_4th_day_bandwidth</BillType>
<BillingData>
<BillingDataItem>
<Bandwidth>4041</Bandwidth>
<CdnRegion>AP1</CdnRegion>
<Flow>2456</Flow>
</BillingDataItem>
<BillingDataItem>
<Bandwidth>3819</Bandwidth>
<CdnRegion>NA</CdnRegion>
</BillingDataItem>
<BillingDataItem>
<Bandwidth>272113</Bandwidth>
<CdnRegion>CN</CdnRegion>
</BillingDataItem>
</BillingData>
<Dimension>flow</Dimension>
<BillTime>2018-09-30T16:00:00Z</BillTime>
</BillHistoryDataItem>
<BillHistoryDataItem>
<BillType>month_avg_day_bandwidth</BillType>
<BillingData>
<BillingDataItem>
<Bandwidth>4389</Bandwidth>
<CdnRegion>AP1</CdnRegion>
</BillingDataItem>
<BillingDataItem>
<Bandwidth>4302</Bandwidth>
<CdnRegion>NA</CdnRegion>
</BillingDataItem>
<BillingDataItem>
<Bandwidth>291641</Bandwidth>
<CdnRegion>CN</CdnRegion>
</BillingDataItem>
</BillingData>
<Dimension>flow</Dimension>
<BillTime>2018-09-30T16:00:00Z</BillTime>
</BillHistoryDataItem>
<BillHistoryDataItem>
<BillType>hour_vas</BillType>
<BillingData>
<BillingDataItem>
<Count>205624</Count>
<ChargeType>DynamicHttp</ChargeType>
</BillingDataItem>
</BillingData>
<Dimension>vas</Dimension>
<BillTime>2018-09-30T16:00:00Z</BillTime>
</BillHistoryDataItem>
<BillHistoryDataItem>
<BillType>hour_vas</BillType>
<BillingData>
<BillingDataItem>
<Count>203601</Count>
<ChargeType>DynamicHttp</ChargeType>
</BillingDataItem>
</BillingData>
<Dimension>vas</Dimension>
<BillTime>2018-09-30T17:00:00Z</BillTime>
</BillHistoryDataItem>
</BillHistoryData>
<RequestId>ED61C6C3-8241-4187-AAA7-5157AE175CEC</RequestId>
</DescribeDcdnUserBillHistoryResponse>
JSON
format
{
"BillHistoryData": {
"BillHistoryDataItem": [
{
"BillType": "month_4th_day_bandwidth",
"BillingData": {
"BillingDataItem": [
{
"Bandwidth": 4041,
"CdnRegion": "AP1",
"Flow": "2456"
},
{
"Bandwidth": 3819,
"CdnRegion": "NA"
},
{
"Bandwidth": 272113,
"CdnRegion": "CN"
}
]
},
"Dimension": "flow",
"BillTime": "2018-09-30T16:00:00Z"
},
{
"BillType": "month_avg_day_bandwidth",
"BillingData": {
"BillingDataItem": [
{
"Bandwidth": 4389,
"CdnRegion": "AP1"
},
{
"Bandwidth": 4302,
"CdnRegion": "NA"
},
{
"Bandwidth": 291641,
"CdnRegion": "CN"
}
]
},
"Dimension": "flow",
"BillTime": "2018-09-30T16:00:00Z"
},
{
"BillType": "hour_vas",
"BillingData": {
"BillingDataItem": [
{
"Count": 205624,
"ChargeType": "DynamicHttp"
}
]
},
"Dimension": "vas",
"BillTime": "2018-09-30T16:00:00Z"
},
{
"BillType": "hour_vas",
"BillingData": {
"BillingDataItem": [
{
"Count": 203601,
"ChargeType": "DynamicHttp"
}
]
},
"Dimension": "vas",
"BillTime": "2018-09-30T17:00:00Z"
}
]
},
"RequestId": "ED61C6C3-8241-4187-AAA7-5157AE175CEC"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidEndTime.Malformed | The specified EndTime is invalid. | The error message returned because the format of the specified end time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
400 | MissingTimeParameter | The StartTime and EndTime must be both specified. | The error message returned because only the StartTime parameter or the EndTime parameter is specified. Specify both parameters or leave both parameters empty. |
For a list of error codes, visit the API Error Center.