Queries resource usage about domain names in a billable region.
Operation description
- You can call this operation up to 10 times per second per account.
- Usage data includes traffic (measured in bytes), bandwidth values (measured in bit/s), and the number of requests.
Time granularity
The time granularity supported by the Interval parameter, the maximum time period within which historical data is available, and the data delay vary with the maximum time range per query, as described in the following table.
Time granularity | Maximum time range per query | Historical data available | Data delay |
---|---|---|---|
5 minutes | 3 days | 93 days | 15 minutes |
1 hour | 31 days | 186 days | 4 hours |
1 day | 366 days | 366 days | 04:00 on the next day |
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | No | The accelerated domain name. You can specify up to 100 domain names in each request. Separate multiple domain names with commas (,). Note
If you do not specify this parameter, the usage data of all accelerated domain names that belong to your Alibaba Cloud account is returned.
| example.com |
StartTime | string | Yes | 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. Note
The minimum time granularity at which the data is queried is 5 minutes.
| 2015-12-10T20:00:00Z |
EndTime | string | Yes | 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. Note
The end time must be later than the start time. The maximum time range that can be queried is 31 days.
| 2015-12-10T22:00:00Z |
Field | string | Yes | The type of data that you want to query. Valid values:
Note
acc does not support the Area parameter.
| bps |
Type | string | No | The type of the requests. Valid values:
Default value: all | dynamic |
DataProtocol | string | No | The protocol of the data to query. Valid values:
Default value: all | all |
Area | string | No | The billable region. Valid values:
Default value: CN | CN |
Interval | string | No | The time interval between the data entries to return. Unit: seconds. The time interval varies with the maximum time range per query. Valid values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day). For more information, see Usage notes. | 300 |
Response parameters
Examples
Sample success responses
JSON
format
{
"DomainName": "example.com",
"EndTime": "2015-12-10T22:00:00Z",
"StartTime": "2015-12-10T20:00:00Z",
"Type": "bps",
"Area": "CN",
"RequestId": "B955107D-E658-4E77-B913-E0AC3D31693E",
"DataInterval": "/",
"UsageDataPerInterval": {
"DataModule": [
{
"TimeStamp": "2015-12-10T21:30:00Z",
"PeakTime": "2015-12-10T21:30:00Z",
"Value": "4233041**",
"SpecialValue": "4233041**"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter | The specified parameter is invalid. | A parameter is set to an invalid value. |
400 | InvalidStartTime.Malformed | The specified StartTime parameter is invalid. | The format of the specified start 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 | InvalidEndTime.Malformed | The specified EndTime is invalid. | 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 | InvalidTime.Malformed | Specified StartTime or EndTime is malformed. | The format of the specified start time or 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 | InvalidParameterField | The specified Field is invalid. | The Field parameter is set to an invalid value. |
400 | InvalidParameterType | The specified Type is invalid. | The Type parameter is set to an invalid value. |
400 | InvalidEndTime.Mismatch | The specified EndTime is earlier than the StartTime. | The end time is earlier than the start time. |
400 | InvalidTimeSpan | The time span exceeds the limit. | The time span exceeds the limit. Configure a valid time span as described in API documentation. |
400 | InvalidParameterInterval | The specified Interval is invalid. | The Interval parameter is set to an invalid value. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|