DescribeEventLog

Updated at:

Queries the event logs of Cloud Firewall.

Operation description

Queries the event logs of Cloud Firewall. This operation supports five types of logs: application access control (app_ctl), web filtering (web_filter), TLS inspection (tls), intrusion prevention (ips), and threat intelligence (threat_intelligence). You can filter logs by time range, source IP address, destination IP address, URL, action, rule result, and attack type. The logs are returned with paging. StartTime and EndTime are UNIX timestamps in seconds. The time span for a single query cannot exceed 8 days. If FirewallType is not specified, the Internet Border firewall (InternetFirewall) is queried by default. To query the VPC firewall, set FirewallType to VpcFirewall.

QPS limit

The QPS limit for a single user is 10 requests per second. If the limit is exceeded, API calls are throttled, which may affect your services. Make API calls at a reasonable rate.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cloudfirewall:DescribeEventLog

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp

string

No

The source IP address of the visitor.

60.182.79.XXX

Lang

string

No

The language of the response message.

zh

StartTime

string

Yes

The start time of the query. The value is a UNIX timestamp in seconds.

1692504764000

EndTime

string

Yes

The end time of the query. The value is a UNIX timestamp in seconds.

1731551104

CurrentPage

string

No

The page number.

1

PageSize

string

No

The number of entries to return on each page.

Default value: 6, which indicates that 6 entries are returned on each page. Maximum value: 10.

10

SourceCode

string

Yes

The tracing code.

yundun

DstIP

string

No

The destination IP address to query. If you specify this parameter, the intrusion prevention events that involve this destination IP address are queried.

10.0.XX.XX

SrcIP

string

No

The source IP address to query. If you specify this parameter, the intrusion prevention events that involve this source IP address are queried.

47.92.x.x

LogType

string

No

The log type.

1

FirewallType

string

No

The type of the Cloud Firewall. Valid values:

  • VpcFirewall: VPC firewall.

  • InternetFirewall (default): Internet Border firewall.

[ "internet", "vpc", "nat" ]

AttackType

integer

No

The attack type of the intrusion prevention event. Valid values:

  • 1: Abnormal connection.

  • 2: Command execution.

  • 3: Brute-force attack.

  • 4: Scan.

  • 5: Other.

  • 6: Information leak.

  • 7: DoS attack.

  • 8: Overflow attack.

  • 9: Web attack.

  • 10: Trojan backdoor.

  • 11: Virus or worm.

  • 12: Mining behavior.

  • 13: Reverse shell.

Note

If you do not specify this parameter, all attack types are queried.

13

RuleResult

string

No

The defense status of Cloud Firewall. Valid values:

  • 1: Alert.

  • 2: Block.

Note

If you do not specify this parameter, all defense statuses are queried.

0

RuleId

string

No

The rule ID.

c0f5caed-d6a5-11e8-8298-00163e109533

SslHandshakeRes

string

No

The TLS handshake result.

Valid values:

  • bypass :

    bypass: Decryption bypassed. Traffic is directly passed through without TLS decryption because no decryption policy (whitelist or blacklist) is matched, the client does not provide an SNI, or TLS inspection is not enabled for the instance.

  • alert :

    alert: Certificate alert. The Subject Alternative Name (SAN) of the server certificate does not match the client SNI. The event is logged and processed as an alert without blocking the traffic.

  • failed :

    failed: Handshake failed. The TLS handshake between the client and the firewall or between the firewall and the origin server fails. For the specific cause, see the TLS error message field in the log.

failed

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

D19D8F70-D64B-5A95-905A-6073BF4A****

TotalCount

integer

The total number of entries.

12

DataList

array<object>

The data list.

object

The data entry.

Direction

string

The traffic direction of the intrusion prevention event. Valid values:

  • in: Inbound.

  • out: Outbound.

in

DstPort

integer

The destination port.

80

RuleId

string

The ID of the protection rule for the intrusion prevention event.

00000000-0000-0000-0000-000000000000

RuleResult

integer

The defense status. Valid values:

  • 1: Alert.

  • 2: Block.

0

DstIP

string

The queried destination IP address. This indicates that the intrusion prevention event involves this destination IP address.

2.2.2.2

SrcPort

integer

The source port.

20206

SrcIP

string

The queried source IP address. This indicates that the intrusion prevention event involves this source IP address.

192.0.XX.XX

RuleName

string

The rule name.

test

StartTime

integer

The start time of the data. The value is a UNIX timestamp in seconds.

1751423362

Url

string

The URL path.

http://example.com/task3%DF'

ApplicationName

string

The application type supported by the access control policy. Use ApplicationNameList instead. Valid values:

  • FTP

  • HTTP

  • HTTPS

  • Memcache

  • MongoDB

  • MQTT

  • MySQL

  • RDP

  • Redis

  • SMTP

  • SMTPS

  • SSH

  • SSL

  • VNC

  • ANY (all application types)

ANY

SslHandshakeRes

string

The TLS handshake result. For example, success indicates that the handshake is successful.

success

SslErrorIndex

string

The phase in which the TLS handshake fails, such as Certificate.

Certificate

SslErrorMsg

string

The cause of the TLS handshake failure, such as BAD_PACKET_LENGTH.

BAD_PACKET_LENGTH

Sni

string

The SNI used when the TLS connection is established.

www.example.com

SslCipher

string

The cipher suite negotiated during the TLS handshake, such as TLS_AES_128_GCM_SHA256.

TLS_AES_128_GCM_SHA256

SslProtocol

string

The TLS version, such as TLSv1.3.

TLSv1.3

AttackType

integer

The attack type of the intrusion prevention event. Valid values:

  • 1: Abnormal connection.

  • 2: Command execution.

  • 3: Brute-force attack.

  • 4: Scan.

  • 5: Other.

  • 6: Information leak.

  • 7: DoS attack.

  • 8: Overflow attack.

  • 9: Web attack.

  • 10: Trojan backdoor.

  • 11: Virus or worm.

  • 12: Mining behavior.

  • 13: Reverse shell.

0

RuleSource

integer

The source of the detection rule for the intrusion prevention event. Valid values:

  • 1: Basic defense.

  • 2: Virtual patches.

  • 4: Threat intelligence.

0

AttackApp

string

The name of the attacked application.

MySql

VulLevel

integer

The severity level of the intrusion prevention event. Valid values:

  • 1: Low.

  • 2: Medium.

  • 3: High.

0

IpProtocol

string

The protocol type.

tcp

MemberUid

integer

The UID of the Cloud Firewall member account.

14151892****7022

HitType

string

The match type.

domain

HitContent

string

The matched content.

www.example.com

Examples

Success response

JSON format

{
  "RequestId": "D19D8F70-D64B-5A95-905A-6073BF4A****",
  "TotalCount": 12,
  "DataList": [
    {
      "Direction": "in",
      "DstPort": 80,
      "RuleId": "00000000-0000-0000-0000-000000000000",
      "RuleResult": 0,
      "DstIP": "2.2.2.2",
      "SrcPort": 20206,
      "SrcIP": "192.0.XX.XX",
      "RuleName": "test",
      "StartTime": 1751423362,
      "Url": "http://example.com/task3%DF'",
      "ApplicationName": "ANY",
      "SslHandshakeRes": "success",
      "SslErrorIndex": "Certificate",
      "SslErrorMsg": "BAD_PACKET_LENGTH",
      "Sni": "www.example.com",
      "SslCipher": "TLS_AES_128_GCM_SHA256",
      "SslProtocol": "TLSv1.3",
      "AttackType": 0,
      "RuleSource": 0,
      "AttackApp": "MySql",
      "VulLevel": 0,
      "IpProtocol": "tcp",
      "MemberUid": 0,
      "HitType": "domain",
      "HitContent": "www.example.com"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorAliUid Aliuid invalid. The aliuid is invalid.
400 ErrorAliUidBlackList The specified aliUid is invalid. The specified aliUid is invalid.
400 ErrorSourceCodeError The source code is invalid. The source code is invalid.
400 ErrorTrafficSlsFirewallType The firewall type of traffic log is invalid. The firewall type of traffic log is invalid.
400 ErrorIpFormat The IP address is invalid. The IP address is invalid.
400 ErrorPortError The port is invalid. The port is invalid.
400 ErrorIpProtocolError The protocol is invalid. The protocol is invalid.
400 ErrorDirectionError The direction is invalid. The direction is invalid.
400 ErrorAttackTypeError The attack type is invalid. The attack type is invalid.
400 ErrorVulLevelFailed VulLevel has failed. VulLevel has failed.
400 ErrorRuleResultError The rule result is invalid. The rule result is invalid.
400 ErrorAppIdError An app ID error occurred. An app ID error occurred.
400 ErrorFlowType The flow type is invalid. The flow type is invalid.
400 ErrorIspError The ISP name is invalid. The ISP name is invalid.
400 ErrorLocationError The location name is invalid. The location name is invalid.
400 ErrorDomainName The domain name is invalid. The domain name is invalid.
400 ErrorTimeError The time is invalid. The time is invalid.
400 ErrorPageNo Either page number or page size is invalid. Either page number or page size is invalid.
400 ErrorParameters A parameter error occurred. A parameter error occurred.
400 ErrorEventLogTypeError The specified log type is invalid or unsupported for the firewall type. Valid values: InternetFirewall supports ips, app_ctl, web_filter, tls, and threat_intelligence; NatFirewall supports ips, app_ctl, and web_filter; VpcFirewall supports ips.
400 ErrorSLSLogStore Failed to get SLS logstore. Failed to obtain the Log Service logstore.
400 ErrorDBSelectError A database select error occurred. The error message returned because an internal error has occurred in querying the database.
400 ErrorAsyncQueryFailed The current query has timed out. We suggest shortening the query time range and trying again. The current query has timed out. We suggest shortening the query time range and trying again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.