Queries operations logs of Anti-DDoS Pro.

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

You can query operations performed on Anti-DDoS Pro, such as configuring burstable protection bandwidth, deactivating the black hole, configuring diversion from origin server, using mitigation sessions, changing the IP addresses of ECS origin servers, and clearing logs.

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 DescribeOpEntities

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

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 30 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 30 days.
RegionId String No cn-hangzhou

The region ID of the instance. Set the value to cn-hangzhou, which indicates an Anti-DDoS Pro 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 instance belongs to the default resource group.

EntityType Integer No 1

The type of the operation object that you want to query. Valid values:

  • 1: IP addresses of Anti-DDoS Pro instances
  • 2: mitigation sessions
  • 3: ECS instances
  • 4: all logs
EntityObject String No 203.***. ***.132

The operation object that you want to query.

Response parameters

Parameter Type Example Description
OpEntities Array

Details about the operations log.

EntityObject String 203.***. ***.132

The operation object.

EntityType Integer 1

The type of the operation object. Valid values:

  • 1: IP address of Anti-DDoS Pro instances
  • 2: mitigation sessions
  • 3: ECS instances
  • 4: all logs
GmtCreate Long 1584451769000

The time when the operation was performed. 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.

OpAccount String 128965410602****

The Alibaba Cloud account that is used to perform the operation.

OpAction Integer 9

The type of the operation. Valid values:

  • 1: configuring burstable protection bandwidth.
  • 5: using mitigation sessions.
  • 8: changing IP addresses of ECS origin servers.
  • 9: deactivating the black hole.
  • 10: configuring diversion from origin server.
  • 11: clearing all logs.
  • 12: downgrading the specifications of instances. This operation is performed to downgrade the burstable protection bandwidth if the instance expires or the account has overdue payments.
  • 13: restoring the specifications of instances. This operation is performed to restore the burstable protection bandwidth if the instance is renewed or you have paid the overdue payments under your account.
OpDesc String {"newEntity":{"actionMethod":"undo"}}

Details about the operation. This parameter is a JSON string. The fields in the value are described as follows:

  • newEntity: the values of the parameters after the operation. This field must be of the STRING type.
  • oldEntity: the values of the parameters before the operation. This field must be of the STRING type.

Both newEntity and oldEntity are JSON strings. The returned parameters vary with OpAtion.

If OpAction is 1,12, or 13, the returned parameter is described as follows:

  • elasticBandwidth: the burstable protection bandwidth. It is of the INTEGER type.

    For example: {"newEntity":{"elasticBandwidth":300},"oldEntity":{"elasticBandwidth":300}}

If OpAction is 5, the returned parameters are described as follows:

  • bandwidth: the burstable protection bandwidth. It is of the INTEGER type. Unit: Gbit/s.
  • count: the total number of mitigation sessions. It is of the INTEGER type.
  • deductCount: the number of used mitigation sessions. It is of the INTEGER type.
  • expireTime: the expiration time of the mitigation sessions. It is of the LONG type. 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.
  • instanceId: the ID of the instance. It is of the STRING type.
  • peakFlow: the peak traffic on the instance. It is of the INTEGER type. Unit: bit/s.

    For example: {"newEntity":{"bandwidth":100,"count":4,"deductCount":1,"expireTime":1616299196000,"instanceId":"ddoscoo-cn-v641kpmq****","peakFlow":751427000}}

If OpAction is 8, the returned parameter is described as follows:

  • instanceId: the ID of the ECS instance whose IP address is changed. It is of the STRING type.

    For example: {"newEntity":{"instanceId":"i-wz9h6nc313zptbqn****"}}

If OpAction is 9, the returned parameter is described as follows:

  • actionMethod: the operation method. It is of the STRING type. Valid values: undo, which indicates that you deactivated the black hole.

    For example: {"newEntity":{"actionMethod":"undo"}}

If OpAction is 10, the returned parameters are described as follows:

  • actionMethod: the operation method. It is of the STRING type. Valid values:
    • do: The Diversion from Origin Server policy is enabled.
    • undo: The Diversion from Origin Server policy is disabled.
  • lines: The ISP line from which the traffic is blocked. Valid values:
    • ct: China Telecom (International)
    • cut: China Unicom (International)

      For example: {"newEntity":{"actionMethod":"undo","lines":["ct"]}}

If OpAction is 11, no parameter is returned, and the description is empty.

RequestId String FB24D70C-71F5-4000-8CD8-22CDA0C53CD1

The ID of the request.

TotalCount Long 1

The total number of returned operation records.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeOpEntitiesResponse>
      <TotalCount>1</TotalCount>
      <RequestId>FB24D70C-71F5-4000-8CD8-22CDA0C53CD1</RequestId>
      <OpEntities>
            <EntityType>1</EntityType>
            <GmtCreate>1584451769000</GmtCreate>
            <OpAccount>128965410602****</OpAccount>
            <OpDesc>
                  <newEntity>
                        <actionMethod>undo</actionMethod>
                  </newEntity>
            </OpDesc>
            <OpAction>9</OpAction>
            <EntityObject>203. ***. ***.132</EntityObject>
      </OpEntities>
</DescribeOpEntitiesResponse>

JSON format

{
    "TotalCount": 1,
    "RequestId": "FB24D70C-71F5-4000-8CD8-22CDA0C53CD1",
    "OpEntities": [
        {
            "EntityType": 1,
            "GmtCreate": 1584451769000,
            "OpAccount": "128965410602****",
            "OpDesc": {
                "newEntity": {
                    "actionMethod": "undo"
                }
            },
            "OpAction": 9,
            "EntityObject": "203. ***. ***.132"
        }
    ]
}

Error codes

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