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
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
nis:GetInternetTuple | list |
|
| none |
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. |
404 | ResourceNotFound.IpSets | The specified instance does not exist or does not have any acceleration region. | The specified instance does not exist or does not have any acceleration region. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-10 | The API operation is deprecated. The Error code has changed | View Change Details |
2024-06-17 | The Error code has changed | View Change Details |
2024-04-15 | The Error code has changed | View Change Details |
2024-04-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-01-19 | The Error code has changed | View Change Details |
2024-01-11 | The Error code has changed | View Change Details |
2023-12-07 | The Error code has changed | View Change Details |
2023-11-24 | The Error code has changed | View Change Details |
2023-11-17 | The Error code has changed | View Change Details |
2023-11-16 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-06-19 | The Error code has changed. The request parameters of the API has changed | View Change Details |