DescribeInternetTrafficTrend

Updated at:

Retrieves Internet traffic trends.

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:DescribeInternetTrafficTrend

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp deprecated

string

No

The source IP address of the visitor.

101.80.171.196

Lang

string

No

The language type of the request and response messages. Valid values:

  • zh (default): Chinese.

  • en: English.

zh

Direction

string

No

The traffic direction of the Internet. Valid values:

  • in: inbound traffic access control.

  • out: outbound traffic access control.

in

StartTime

string

Yes

The start time of the query. The value is a UNIX timestamp in seconds.

1670307484

EndTime

string

Yes

The end time of the query. The value is a UNIX timestamp in seconds.

1674958929

SourceCode

string

Yes

The tracing code.

yundun

SrcPublicIP

string

No

The source public IP address.

47.112.210.136

SrcPrivateIP

string

No

The source private IP address.

10.100.134.60

TrafficType

string

No

The collected traffic type. Valid values:

  • max (default): peak traffic.

  • avg: average traffic.

max

Response elements

Element

Type

Description

Example

object

Schema of Response

MaxTotalBps

integer

The peak network throughput in both outbound and inbound directions. Unit: bps.

89783147

MaxBandwidthTime

integer

The timestamp when the peak bandwidth occurred. The value is a UNIX timestamp in seconds.

1672736400

AvgInBps

integer

The average network throughput in the inbound direction. Unit: bps.

6114152

RequestId

string

The ID of the request.

C7E837BE-0379-565E-B7B4-DE595C8D337C

MaxInBps

integer

The peak network throughput in the inbound direction. Unit: bps.

10275643

MaxOutBps

integer

The peak network throughput in the outbound direction. Unit: bps.

395188

AvgSession

integer

The average number of requests.

79013

MaxSession

integer

The peak number of requests.

931641

AvgTotalBps

integer

The average network throughput in both outbound and inbound directions. Unit: bps.

2306

AvgOutBps

integer

The average network throughput in the outbound direction. Unit: bps.

70148993

TotalInBytes

integer

The total network traffic in the inbound direction. Unit: bytes.

41536824243873

TotalOutBytes

integer

The total network traffic in the outbound direction. Unit: bytes.

2660894567178

TotalBytes

integer

The total network traffic in both outbound and inbound directions. Unit: bytes.

963227674958

TotalSession

integer

The total number of requests.

1061449

TotalExceedBytes

integer

The total excess traffic.

4243873

MaxDayExceedBytes

integer

The maximum daily excess traffic.

873

DataList

array<object>

The list of traffic statistics information.

object

The list of traffic statistics information.

SessionCount

integer

The number of requests.

27

Time

integer

The time when the traffic occurred. The value is a UNIX timestamp in seconds.

If the data for this time point is not fully processed, the values of other fields are -1.

1659405600

InBps

integer

The network throughput in the inbound direction. Unit: bps.

187

InPps

integer

The packet rate in the inbound direction. Unit: pps.

2

NewConn

integer

The number of new connections.

27

OutBytes

integer

The total network traffic in the outbound direction. Unit: bytes.

1123

OutPps

integer

The packet rate in the outbound direction. Unit: pps.

2

InBytes

integer

The total network traffic in the inbound direction. Unit: bytes.

235

OutBps

integer

The network throughput in the outbound direction. Unit: bps.

45

TotalBps

integer

The total network throughput in both outbound and inbound directions. Unit: bps.

232

Examples

Success response

JSON format

{
  "MaxTotalBps": 89783147,
  "MaxBandwidthTime": 1672736400,
  "AvgInBps": 6114152,
  "RequestId": "C7E837BE-0379-565E-B7B4-DE595C8D337C",
  "MaxInBps": 10275643,
  "MaxOutBps": 395188,
  "AvgSession": 79013,
  "MaxSession": 931641,
  "AvgTotalBps": 2306,
  "AvgOutBps": 70148993,
  "TotalInBytes": 41536824243873,
  "TotalOutBytes": 2660894567178,
  "TotalBytes": 963227674958,
  "TotalSession": 1061449,
  "TotalExceedBytes": 4243873,
  "MaxDayExceedBytes": 873,
  "DataList": [
    {
      "SessionCount": 27,
      "Time": 1659405600,
      "InBps": 187,
      "InPps": 2,
      "NewConn": 27,
      "OutBytes": 1123,
      "OutPps": 2,
      "InBytes": 235,
      "OutBps": 45,
      "TotalBps": 232
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorAliUid Aliuid invalid. The aliuid is invalid.
400 ErrorSourceCodeError The source code is invalid. The source code is invalid.
400 ErrorDirectionError The direction is invalid. The direction is invalid.
400 ErrorIpFormat The IP address is invalid. The IP address is invalid.
400 ErrorSrcDstIPError SrcPublicIP and DstPublicIP cannot be specified at the same time. The source public IP address and destination public IP address cannot be specified at the same time.
400 ErrorTrafficType The traffic type is invalid. The traffic type is invalid.
400 ErrorIntervalError The interval is invalid. The interval is invalid.
400 ErrorTimeError The time is invalid. The time is invalid.
400 ErrorDataTypeError The data type is invalid. The data type is invalid.
400 ErrorDBSelectError A database select error occurred. The error message returned because an internal error has occurred in querying the database.
400 ErrorMarshalJSON internal error. Internal error.
400 ErrorNotBuyUser Not buy user. Your account has not activated the Cloud Firewall and cannot call the API.
400 MissingSourceCode SourceCode is mandatory for this action. The required parameter SourceCode is missing. Add SourceCode (such as yundun) to the request and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.