Call the DescribeOnDemandDdosEvent operation to query the DDoS events recorded for the IP address of the Anti-DDoS on-demand instance.
Debugging
Request parameters
Prameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | DescribeOnDemandDdosEvent |
The operation that you want to perform. Set the value to DescribeOnDemandDdosEvent. |
EndTime | Integer | Yes | 1557909844 |
The timestamp that specifies the end of the time range to query. Unit: seconds. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970. |
InstanceId | String | No | ddosbgp-cn-x1 |
The ID of the on-demand instance to query. |
PageNo | Integer | Yes | 1 |
The number of the page to return. Default value: 1. |
PageSize | Integer | Yes | 10 |
The number of entries to return on each page. The maximum value is 50. The default value is 10. |
StartTime | Integer | Yes | 1557305044 |
The timestamp that specifies the beginning of the time range to query. Unit: seconds. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970. |
Ip | String | Yes | 1.1.1.1 |
The IP address of the protection target. |
ResourceGroupId | String | Yes | default |
The ID of the resource group. |
Region ID | String | Yes | cn-hangzhou |
The ID of the region to query. |
Response parameters
Parameter | Type | Sample response | Description |
---|---|---|---|
Events | Array |
The list of DDoS events and the details of each event. |
|
EndTime | Integer | 1557891306 |
The timestamp that indicates the end time of the attack. Unit: seconds. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970. |
Ip | String | 1.1.1.1 |
The IP address of the protection target that encounters the DDoS attack. |
Mbps | Integer | 110000 |
The throughput of the DDoS attack. Unit: Mbit/s. |
Pps | Integer | 0 |
The packet forwarding rate of the DDoS attack. Unit: packets per second (PPS). |
StartTime | Integer | 1557889506 |
The timestamp that indicates the start time of the attack. Unit: seconds. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970. |
Status | String | defense_end |
The status of the event. Valid values:
|
RequestId | String | 6A507DC8-F657-4C13-84E2-D1D1B9400753 |
The ID of the request. |
Total | Long | 8 |
The total number of DDoS events. |
Samples
Sample requests
http(s)://[Endpoint]/? Action=DescribeOnDemandDdosEvent
&EndTime=1557909844
&InstanceId=ddosbgp-cn-x1
&PageNo=1
&PageSize=10
&StartTime=1557305044
&<Common request parameters>
Sample success responses
XML
format
<DescribeOnDemandDdosEventResponse>
<RequestId>6A507DC8-F657-4C13-84E2-D1D1B9400753</RequestId>
</Events>
<Event>
<qps>0</qps>
<Status>finished</Status>
<Ip>1.1.1.1</Ip>
<Mbps>110000</Mbps>
<EndTime>1542957514000</EndTime>
<StartTime>1542957499000</StartTime>
</Event>
</Events>
<Total>1</Total>
</DescribeOnDemandDdosEventResponse>
JSON
format
{
"RequestId":"6A507DC8-F657-4C13-84E2-D1D1B9400753",
"Events":[
{
"Pps":450,
"IP":"1.1.1.1",
"Status":"defense_end",
"Mbps":110000,
"EndTime":1557891306,
"StartTime":1557889506
}
],
"Total":1
}
Error codes
For a list of error codes, visit the API Error Center.