Queries the number of assets that are under DDoS attacks in a specific region. The assets can be elastic IP addresses (EIPs). The assets can also be Elastic Compute Service (ECS) instances or Server Load Balancer (SLB) instances that are assigned public IP addresses.

Usage notes

You can call the DescribeDdosCount operation to query the number of assets that are under DDoS attacks in a specific region.

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 DescribeDdosCount

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

DdosRegionId String Yes cn-hangzhou

The region ID of the asset to query.

Note You can call the DescribeRegions operation to query the most recent region list.
InstanceType String Yes ecs

The type of the asset to query. Valid values:

  • ecs: ECS instance
  • slb: SLB instance
  • eip: EIP

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
RequestId String 7D66C762-324E-51CE-B461-2007996087B2

The ID of the request.

DdosCount Object

The number of assets that are under DDoS attacks.

BlackholeCount Integer 0

The number of assets for which blackhole filtering is triggered.

InstacenCount Integer 0

The total number of assets.

DefenseCount Integer 4

The number of assets for which traffic scrubbing is triggered.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDdosCount
&DdosRegionId=cn-hangzhou
&InstanceType=ecs
&Common request parameters

Sample success responses

XML format

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

<DescribeDdosCountResponse>
    <RequestId>7D66C762-324E-51CE-B461-2007996087B2</RequestId>
    <DdosCount>
        <BlackholeCount>0</BlackholeCount>
        <InstacenCount>0</InstacenCount>
        <DefenseCount>4</DefenseCount>
    </DdosCount>
</DescribeDdosCountResponse>

JSON format

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

{
  "RequestId" : "7D66C762-324E-51CE-B461-2007996087B2",
  "DdosCount" : {
    "BlackholeCount" : 0,
    "InstacenCount" : 0,
    "DefenseCount" : 4
  }
}

Error codes

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