Queries the logs of advanced mitigation sessions of Anti-DDoS Premium.

Note This operation is suitable only for Anti-DDoS Premium.

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 DescribeDefenseRecords

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

EndTime Long Yes 1583683200000

The end of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

Note The time must be in the latest 90 days.
PageNumber Integer Yes 1

The number of the page to return. For example, to query the returned results on the first page, set the value to 1.

PageSize Integer Yes 10

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

StartTime Long Yes 1582992000000

The beginning of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

Note The time must be in the latest 90 days.
RegionId String No ap-southeast-1

The region ID of the instance. Set the value to ap-southeast-1, which indicates an Anti-DDoS Premium instance.

ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the domain belongs to the default resource group.

InstanceId String No ddoscoo-cn-mp91j1ao****

The ID of the instance.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.

Response parameters

Parameter Type Example Description
DefenseRecords Array

Details about the log of an advanced mitigation session.

AttackPeak Long 6584186000

The peak attack traffic. Unit: bit/s.

EndTime Long 1583683200000

The end time of the advanced mitigation session. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

EventCount Integer 2

The number of attacks.

InstanceId String ddoscoo-cn-mp91j1ao****

The ID of the instance.

StartTime Long 1582992000000

The start time of the advanced mitigation session. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

Status Integer 0

The status of the advanced mitigation session. Valid values:

  • 0: The advanced mitigation session is being used.
  • 1: The advanced mitigation session has been used.
RequestId String 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

The ID of the request.

TotalCount Long 1

The total number of advanced mitigation sessions.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeDefenseRecords
&EndTime=1583683200000
&PageNumber=1
&PageSize=10
&StartTime=1582992000000
&<Common request parameters>

Sample success responses

XML format

<DescribeDefenseRecordsResponse>
	  <TotalCount>1</TotalCount>
	  <RequestId>0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc</RequestId>
	  <DefenseRecords>
		    <StartTime>1582992000000</StartTime>
		    <EndTime>1583683200000</EndTime>
		    <InstanceId>ddoscoo-cn-mp91j1ao****</InstanceId>
		    <Status>0</Status>
		    <AttackPeak>10</AttackPeak>
		    <EventCount>1</EventCount>
	  </DefenseRecords>
</DescribeDefenseRecordsResponse>

JSON format

{
    "TotalCount": 1,
    "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc",
    "DefenseRecords": [
        {
            "StartTime": 1582992000000,
            "EndTime": 1583683200000,
            "InstanceId": "ddoscoo-cn-mp91j1ao****",
            "Status": 0,
            "AttackPeak": 10,
            "EventCount": 1
        }
    ]
}

Error codes

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