DescribeInternetTrafficTop

Updated at:

Queries the top trend chart for Internet traffic.

Operation description

Queries the top trend data for Internet traffic.

Before you begin: Ensure that Cloud Firewall is activated for your account before you call this operation. You can call DescribeUserBuyVersion to query the activation status. If the returned UserStatus is true (valid), Cloud Firewall is activated. If UserStatus is false (invalid) or InstanceStatus is free (no valid instance), Cloud Firewall is not activated for the account or the instance has expired. Activate Cloud Firewall before you call this operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cloudfirewall:DescribeInternetTrafficTop

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp

string

No

The source IP address.

117.82.14.XXX

Lang

string

No

The language.

Valid values:

  • en :

    English.

  • zh :

    Chinese.

zh

Direction

string

No

The traffic direction.

Valid values:

  • in :

    Inbound traffic.

  • out :

    Outbound traffic.

in

StartTime

string

Yes

The start time. Specify a UNIX timestamp in seconds.

1656664560

EndTime

string

Yes

The end time. Specify a UNIX timestamp in seconds.

1734055824

SourceCode

string

Yes

The tracing code.

yundun

DataType

string

Yes

The traffic data type.

Valid values:

  • in_src_location :

    Source location.

  • in_src_ip :

    Source IP address.

in_src_ip

RuleResult

string

No

The defense result of the rule.

Valid values:

  • 0 :

    Allow.

  • 1 :

    Alert.

  • 2 :

    Drop.

1

RuleSource

string

No

The rule source.

Valid values:

  • 1 :

    Basic protection.

  • 2 :

    Virtual patching.

  • 3 :

    Basic ACL.

  • 4 :

    Threat intelligence.

1

Sort

string

No

The sort order.

Valid values:

  • in_bytes :

    in_bytes

  • session_count :

    session_count

  • out_bytes :

    out_bytes

  • total_bytes :

    total_bytes

  • out_packets :

    out_packets

  • in_packets :

    in_packets

in_bytes

ShowCountryName

string

No

Specifies whether to display country names.

China

Limit

string

No

The maximum number of top entries. Default value: 50. Valid values: 1 to 50.

50

Response elements

Element

Type

Description

Example

object

DataType

string

The traffic data type.

Valid values:

  • in_src_location :

    Source location.

  • in_src_ip :

    Source IP address.

in_src_ip

RequestId

string

The request ID.

15FCCC52-1E23-57AE-B5EF-3E00A3******

DataCount

integer

The number of traffic data entries.

10

DataList

array<object>

The list of traffic data entries.

object

The list of traffic data entries.

DataValue

string

The inbound traffic percentage.

47.12

SessionCount

integer

The number of sessions.

27

TotalBytes

integer

The total traffic. Unit: bytes.

0

DataName

string

The country name.

US

IsSubscribed

boolean

Indicates whether it is subscribed.

false

LabelList

array

The list of labels.

string

The label.

NA

Examples

Success response

JSON format

{
  "DataType": "in_src_ip",
  "RequestId": "15FCCC52-1E23-57AE-B5EF-3E00A3******",
  "DataCount": 10,
  "DataList": [
    {
      "DataValue": "47.12",
      "SessionCount": 27,
      "TotalBytes": 0,
      "DataName": "US",
      "IsSubscribed": false,
      "LabelList": [
        "NA"
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorSourceCodeError The source code is invalid. The source code is invalid.
400 ErrorDataTypeError The data type is invalid. The data type is invalid.
400 ErrorDirectionError The direction is invalid. The direction is invalid.
400 ErrorRuleSourceError The rule source is invalid. The rule source is invalid.
400 ErrorTimeError The time is invalid. The time is invalid.
400 ErrorIntervalError The interval is invalid. The interval is invalid.
400 ErrorSortError The sort is invalid. The sort is invalid.
400 ErrorLimitCountFailed The limit count is invalid. The limit is invalid.
400 ErrorNotBuyUser Not buy user. Your account has not activated the Cloud Firewall and cannot call the API.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.