All Products
Search
Document Center

Network Intelligence Service:GetTransitRouterFlowTopN

Last Updated:Aug 26, 2024

Queries the rankings of inter-region traffic data in the form of 1-tuple, 2-tuple, or 5-tuple. Inter-region traffic data can be ranked by metrics such as traffic volumes and the number of packets.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
nis:GetTransitRouterFlowTopNlist
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
BeginTimelongYes

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. The maximum time range that you can query is 24 hours.

1684373600099
EndTimelongYes

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. The maximum time range that you can query is 24 hours.

1638239093000
TopNintegerNo

Specifies the maximum number of data entries to display. Default value: 10. Maximum value: 100.

20
DirectionstringYes

The direction of the inter-region traffic in the local regions or for the local IP addresses. Valid values:

  • in: inbound traffic
  • out: outbound traffic
in
GroupBystringYes

The dimension for ranking inter-region traffic data. The value of this parameter is case-sensitive. Valid values:

  • 1Tuple: queries the rankings of inter-region traffic data for the local regions, Cloud Enterprise Network (CEN) instances, and IP addresses.
  • 2Tuple: queries the rankings of inter-region traffic data for the local and remote regions, and the local and remote IP addresses.
  • 5Tuple: queries the rankings of inter-region traffic data for the local and remote IP addresses, local and remote ports, and protocols.
  • Cen: queries the rankings of inter-region traffic data for CEN instances.
  • RegionPair: queries the rankings of inter-region traffic data for the local and remote regions.
  • Port: queries the rankings of inter-region traffic data for the local and remote ports.
  • Protocol: queries the rankings of inter-region traffic data for the protocols.
1Tuple
ThisRegionstringNo

The local region where the local IP address resides.

cn-shanghai
ThisIpstringNo

The local IP address.

1.8.XX.XX
ThisPortstringNo

The local port.

80
OtherRegionstringNo

The remote region.

ap-southeast-1
OtherIpstringNo

The remote IP address.

122.112.XX.XX
OtherPortstringNo

The remote port.

10869
ProtocolstringNo

The protocol number.

Note All protocols are supported. This parameter is required only if you set GroupBy to 5Tuple or Protocol.
6
OrderBystringNo

The metric for ranking inter-region traffic data. Default value: Bytes. This value specifies that inter-region traffic data is ranked by traffic volume.

Bytes
SortstringNo

The order for ranking inter-region traffic data. Valid values:

  • desc: descending order
  • asc: ascending order
desc
CenIdstringNo

The CEN instance ID.

cen-ia8kw1zjv4hyal****
BandwithPackageIdstringNo

The ID of the CEN bandwidth plan.

cenbwp-ia8kw1zjv4hyal*****
AccountIdsarrayNo

The IDs of the member accounts.

stringNo

The ID of the member account.

[\"118639953821xxxx\"]
UseMultiAccountbooleanNo

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

D5E98683-355B-5867-8D3D-A24755F6895B
TransitRouterFlowTopNarray<object>

The ranking result of inter-region traffic data.

object
AccountIdstring

The account ID.

118639953821xxxx
CenIdstring

The CEN instance ID.

cen-ia8kw1zjv4hyal****
ThisRegionstring

The local region where the local IP address resides.

cn-shanghai
ThisIpstring

The local IP address.

1.8.XX.XX
ThisPortstring

The local port.

80
OtherRegionstring

The remote region where the remote IP address resides.

ap-southeast-1
OtherIpstring

The remote IP address.

47.216.XX.XX
OtherPortstring

The remote port.

53470
Protocolstring

The protocol number.

6
StartTimestring

The beginning of the time range that you queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-01-31T05:40:00Z
EndTimestring

The end of the time range that you queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-01-31T06:40:00Z
Packetsdouble

The total number of packets in the specified time range.

88
Bytesdouble

The total volume of traffic in the specified time range.

188
BandwithPackageIdstring

The ID of the CEN bandwidth plan.

cenbwp-ia8kw1zjv4hyal****

Examples

Sample success responses

JSONformat

{
  "RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
  "TransitRouterFlowTopN": [
    {
      "AccountId": "118639953821xxxx",
      "CenId": "cen-ia8kw1zjv4hyal****",
      "ThisRegion": "cn-shanghai",
      "ThisIp": "1.8.XX.XX",
      "ThisPort": "80",
      "OtherRegion": "ap-southeast-1",
      "OtherIp": "47.216.XX.XX",
      "OtherPort": "53470",
      "Protocol": "6",
      "StartTime": "2023-01-31T05:40:00Z",
      "EndTime": "2023-01-31T06:40:00Z",
      "Packets": 88,
      "Bytes": 188,
      "BandwithPackageId": "cenbwp-ia8kw1zjv4hyal****"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.TopNThe TopN(%s) should not greater than 100.Only top 100 are supported. Actual input: (%s).
400IllegalParam.BeginTimeThe specified begin time (%s) is invalid.The specified start time (%s) is invalid.
400IllegalParam.BeginTimeAndEndTimeIt only supports querying data for up to 7 days: %s.You can query data within the last seven days: %s.
400IllegalParam.OrderByThe specified param of orderBy (%s) is invalid.The specified sort field (%s) is invalid.
400IllegalParam.SortThe specified Sort(%s) is invalid.Valid values for the sort field: desc and asc.
400IllegalParam.AccountIdsThe specified parameter accountId (%s) is invalid.The specified parameter accountId (%s) is invalid.
400IllegalParam.inOrOutValid values for the inOrOut parameter: in and out.Valid values for the inOrOut parameter: in and out.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-10The API operation is deprecated. The Error code has changedView Change Details
2023-12-07The Error code has changedView Change Details
2023-10-24The Error code has changedView Change Details