DescribeEventLog
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
Test
RAM authorization
|
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:
|
[ "internet", "vpc", "nat" ] |
| AttackType |
integer |
No |
The attack type of the intrusion prevention event. Valid values:
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:
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:
|
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 |
| 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:
|
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:
|
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:
|
0 |
| RuleSource |
integer |
The source of the detection rule for the intrusion prevention event. Valid values:
|
0 |
| AttackApp |
string |
The name of the attacked application. |
MySql |
| VulLevel |
integer |
The severity level of the intrusion prevention event. Valid values:
|
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.