Queries the top N IP addresses from which the most traffic is forwarded by an on-demand instance within a specific period of time.

Usage notes

You can call the DescribeTopTraffic operation to query the top N IP addresses from which the most traffic is forwarded by an on-demand instance within a specific period.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTopTraffic

The operation that you want to perform. Set the value to DescribeTopTraffic.

InstanceId String Yes ddosbgp-cn-z2q1qzxb****

The ID of the on-demand instance.

Note You can call the DescribeOnDemandInstance operation to query the IDs of all on-demand instances.
Ipnet String No 47.XX.XX.0/24

The CIDR block of the on-demand instance that you want to query.

StartTime String Yes 1560853054

The beginning of the time range to query. This value is a UNIX timestamp. Unit: seconds.

EndTime String Yes 1563445054

The end of the time range to query. This value is a UNIX timestamp. Unit: seconds.

Rn Integer No 1

The number of IP addresses from which the most traffic is forwarded. Default value: 1, which indicates the IP address from which the most traffic is forwarded.

PageNo Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10. Maximum value: 50.

ResourceGroupId String No rg-acfm2pz25js****

The ID of the resource group to which the on-demand instance belongs in Resource Management.

If you do not specify this parameter, the instance belongs to the default resource group.

RegionId String No cn-zhangjiakou

The region ID of the on-demand instance.

Note You can call the DescribeRegions operation to query the most recent region list.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
Total Long 1

The total number of entries returned.

RequestId String CF33B4C3-196E-4015-AADD-5CAD00057B80

The ID of the request.

TrafficList Array of Traffic

The information about the traffic that is forwarded by the on-demand instance.

Ip String 47.XX.XX.0

The IP address from which the most traffic is forwarded by the on-demand instance.

AttackPps Integer 0

The number of attack data packets. Unit: packets per second (pps).

Bps Integer 2919212

The total traffic. Unit: Kbit/s.

Pps Integer 100000

The total number of data packets. Unit: pps.

AttackBps Integer 0

The attack traffic. Unit: Kbit/s.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeTopTraffic
&InstanceId=ddosbgp-cn-z2q1qzxb****
&StartTime=1560853054
&EndTime=1563445054
&Rn=1
&PageNo=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeTopTrafficResponse>
    <Total>1</Total>
    <RequestId>CF33B4C3-196E-4015-AADD-5CAD00057B80</RequestId>
    <TrafficList>
        <Ip>47.XX.XX.0</Ip>
        <AttackPps>0</AttackPps>
        <Bps>2919212</Bps>
        <Pps>100000</Pps>
        <AttackBps>0</AttackBps>
    </TrafficList>
</DescribeTopTrafficResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Total" : 1,
  "RequestId" : "CF33B4C3-196E-4015-AADD-5CAD00057B80",
  "TrafficList" : [ {
    "Ip" : "47.XX.XX.0",
    "AttackPps" : 0,
    "Bps" : 2919212,
    "Pps" : 100000,
    "AttackBps" : 0
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.