Queries the rankings of Internet traffic data in the form of 1-tuple, 2-tuple, or 5-tuple. Internet traffic data can be ranked by metrics such as traffic volumes and the number of packets.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region for which you want to query the Internet traffic. | cn-shanghai |
TupleType | integer | Yes | The type of the tuple. Valid values:
| 1 |
BeginTime | long | Yes | The beginning of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. | 1684373600099 |
EndTime | long | Yes | The end of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. | 1684373700099 |
Direction | string | Yes | The direction of the Internet traffic that you want to query. Valid values:
| in |
OrderBy | string | No | The metric for data ranking. Default value: ByteCount. This value indicates that Internet traffic data is ranked by traffic volume. Valid values:
| ByteCount |
CloudIp | string | No | The local IP address. | 112.74.XX.XX |
CloudPort | string | No | The local port. Note
This parameter is required only if you set GroupBy to CloudPort.
| 443 |
OtherIp | string | No | The remote IP address. Note
This parameter is required only when you set TupleType to 2 or 5.
| 122.112.XX.XX |
OtherPort | string | No | The remote port. Note
This parameter is required only when you set TupleType to 5.
| 40002 |
InstanceId | string | No | The ID of the Alibaba Cloud instance. | eip-sample* |
Protocol | string | No | The protocol number. Note
All protocols are supported. This parameter is required only when you set TupleType to 5.
| 6 |
Sort | string | No | The order in which instances are ranked by Internet traffic. Valid values:
| desc |
TopN | integer | No | Specifies top-N traffic data to display. Default value: 10. This value specifies to display top-10 traffic data by default. Max value: 100. | 10 |
CloudIsp | string | No | The local Internet service provider (ISP). Note
In most cases, the value is Alibaba or Alibaba Cloud.
| Alibaba |
OtherIsp | string | No | The remote ISP. Note
This parameter is required if you want to view the information about the remote ISP.
| China Mobile |
OtherCountry | string | No | The remote country. Note
This parameter is required only if you set TupleType to 2 or 5.
| China |
OtherCity | string | No | The remote city. Note
This parameter is required only if you set TupleType to 2 or 5.
| Hangzhou |
InstanceList | array | No | The instance IDs for filtering. | |
string | No | The instance ID for filtering. | [\"eip-sample*\"] | |
CloudIpList | array | No | The local IP addresses for filtering. | |
string | No | The local IP address for filtering. | [\"103.202.XX.XX\"] | |
UseMultiAccount | boolean | No | Specifies whether to enable the multi-account management feature. Default value: false. This value specifies that the multi-account management feature is disabled. Note
By default, the multi-account management feature is not available. If you want to use this feature, contact your account manager to apply for permissions.
| false |
AccountIds | array | No | The IDs of member accounts. | |
long | No | The ID of the member account. | [123] |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
"Data": [
{
"BeginTime": "1684373600099",
"Direction": "in",
"InstanceId": "eip-sample*",
"AccessRegion": "cn-hongkong-pop",
"CloudIp": "112.74.XX.XX",
"CloudPort": "443",
"OtherIp": "122.112.XX.XX",
"OtherPort": "40002",
"Protocol": "6",
"CloudCountry": "China",
"CloudProvince": "Jiangsu",
"CloudCity": "Nanjing",
"CloudIsp": "China Mobile",
"CloudProduct": "EIP",
"OtherCountry": "United States",
"OtherProvince": "Texas",
"OtherCity": "Austin",
"OtherIsp": "amazon.com",
"OtherProduct": "ECS",
"Rtt": 10000,
"ByteCount": 88,
"PacketCount": 66,
"OutOrderCount": 1,
"InByteCount": 88,
"OutByteCount": 66,
"InPacketCount": 33,
"OutPacketCount": 22,
"InOutOrderCount": 2,
"OutOutOrderCount": 1,
"InRetranCount": 0,
"OutRetranCount": 1,
"RetransmitRate": 0.1
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.TopN | The TopN(%s) should not greater than 100. | Only top 100 are supported. Actual input: (%s). |
400 | IllegalParam.BeginTimeAndEndTime1H | It only supports querying data for up to 1 hour: %s. | Maximum support for querying 1 hour of data: %s. |
400 | IllegalParam.GroupBy | The specified param of GroupBy (%s) is invalid. | The specified group field (%s) is invalid. |
400 | IllegalParam.OrderBy | The specified param of orderBy (%s) is invalid. | The specified sort field (%s) is invalid. |
400 | IllegalParam.RegionId | The specified region ID (%s) is invalid. | The specified region ID (%s) is invalid. |
400 | IllegalParam.BeginTimeAndEndTime | It only supports querying data for up to 24 hours: %s. | The time range that you can query must be no longer than 24 hours. |
400 | IllegalParam.BeginTimeAndEndTime5M | It only supports querying data for up to 5 minute when TupleType is 5 and the CloudIp and OtherIp are both empty: %s. | When TupleType = 5 and the CloudIp and OtherIp are both empty, you can only query data in a range of up to 5 minutes. |
400 | OperationFailed.DbConcurrentTooHigh | The operation failed due to too many concurrent queries. Please try again later. | The operation failed because there are too many current users. Please try again later. |
400 | OperationFailed.DataTooMuch | Too much data has been queried under the specified conditions. Shorten the query time, specify more precise filtering conditions, or try again later. | Too much data has been queried under the specified conditions. Shorten the query time, specify more precise filtering conditions, or try again later. |
404 | ResourceNotFound.InstanceId | The specified InstanceId(%s) does not exist. | The specified InstanceId does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-04-15 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2024-04-10 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||
| ||||||||||||
2024-01-19 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2024-01-11 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-12-07 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-11-24 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-11-17 | The Error code has changed | see changesets | ||||||||||
| ||||||||||||
2023-11-16 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||
| ||||||||||||
2023-06-19 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||
|