查询云防火墙事件日志。
接口说明
查询云防火墙事件日志,支持应用访问控制(app_ctl)、Web 过滤(web_filter)、TLS 检查(tls)、入侵防御(ips)、威胁情报(threat_intelligence)五类日志。可按时间范围、源 IP、目的 IP、URL、动作、规则结果、攻击类型等条件过滤,分页返回日志明细。StartTime 与 EndTime 为秒级 Unix 时间戳,单次查询时间跨度不能超过 8 天。FirewallType 不传时默认查询互联网边界防火墙(InternetFirewall),VPC 边界防火墙传 VpcFirewall。
QPS 限制
本接口的单用户 QPS 限制为 10 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
yundun-cloudfirewall:DescribeEventLog |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SourceIp |
string |
否 |
访问者源 IP 地址。 |
60.182.79.XXX |
| Lang |
string |
否 |
接收消息的语言类型。 |
zh |
| StartTime |
string |
是 |
查询开始时间。使用秒级时间戳格式表示。 |
1692504764000 |
| EndTime |
string |
是 |
设置查询结束时间。使用秒级时间戳格式表示。 |
1731551104 |
| CurrentPage |
string |
否 |
分页查询时的页码。 |
1 |
| PageSize |
string |
否 |
设置分页查询每页包含多少条结果。 默认值为 6,表示每页包含 6 条结果。最大值为 10。 |
10 |
| SourceCode |
string |
是 |
溯源码。 |
yundun |
| DstIP |
string |
否 |
要查询的目的 IP。设置该参数表示查询包含了这条目的 IP 的入侵防御事件。 |
10.0.XX.XX |
| SrcIP |
string |
否 |
要查询的源 IP。设置该参数表示查询包含了这条源 IP 的入侵防御事件。 |
47.92.x.x |
| LogType |
string |
否 |
日志类型 |
1 |
| FirewallType |
string |
否 |
云防火墙类型。取值:
|
[ "internet", "vpc", "nat" ] |
| AttackType |
integer |
否 |
入侵防御事件的攻击类型。取值:
说明
不设置该参数表示查询全部攻击类型。 |
13 |
| RuleResult |
string |
否 |
云防火墙的防御状态。取值:
说明
不设置该参数表示查询所有防御状态。 |
0 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| DataList |
array<object> |
运营商列表。 |
|
|
object |
数据列表。 |
||
| ApplicationName |
string |
访问控制策略支持的应用类型,推荐使用 ApplicationNameList。取值:
|
ANY |
| AttackApp |
string |
被攻击应用的名称。 |
MySql |
| AttackType |
integer |
该入侵防御事件的攻击类型。取值:
|
0 |
| Direction |
string |
该入侵防御事件的流量方向。取值:
|
in |
| DstIP |
string |
查询到的目的 IP。表示入侵防御事件中包含了这条目的 IP。 |
2.2.2.2 |
| DstPort |
integer |
目标端口。 |
80 |
| HitContent |
string |
命中内容 |
www.example.com |
| HitType |
string |
命中类型 |
domain |
| IpProtocol |
string |
协议类型。 |
tcp |
| MemberUid |
integer |
云防火墙成员账号的 UID。 |
14151892****7022 |
| RuleId |
string |
本次入侵防御事件的防护规则 ID。 |
00000000-0000-0000-0000-000000000000 |
| RuleName |
string |
规则名称。 |
test |
| RuleResult |
integer |
防御状态。取值:
|
0 |
| RuleSource |
integer |
本次入侵防御事件的检测规则来源。取值:
|
0 |
| Sni |
string |
建立 TLS 链接时使用的 SNI。 |
www.example.com |
| SrcIP |
string |
查询到的源 IP。表示入侵防御事件中包含了这条源 IP。 |
192.0.XX.XX |
| SrcPort |
integer |
数据源的端口。 |
20206 |
| SslCipher |
string |
TLS 握手协商使用的加密套件,如 TLS_AES_128_GCM_SHA256。 |
TLS_AES_128_GCM_SHA256 |
| SslErrorIndex |
string |
TLS 握手失败的阶段,如 Certificate。 |
Certificate |
| SslErrorMsg |
string |
TLS 握手失败的原因,如 BAD_PACKET_LENGTH。 |
BAD_PACKET_LENGTH |
| SslHandshakeRes |
string |
TLS 握手结果,如 success 表示握手成功。 |
success |
| SslProtocol |
string |
TLS 版本,如 TLSv1.3。 |
TLSv1.3 |
| StartTime |
integer |
数据开始时间。时间戳格式,单位:秒。 |
1751423362 |
| Url |
string |
文档路径。 |
http://example.com/task3%DF' |
| VulLevel |
integer |
该入侵防御事件的安全等级。取值:
|
0 |
| RequestId |
string |
结果的请求 ID。 |
D19D8F70-D64B-5A95-905A-6073BF4A**** |
| TotalCount |
integer |
总数。 |
12 |
示例
正常返回示例
JSON格式
{
"DataList": [
{
"ApplicationName": "ANY",
"AttackApp": "MySql",
"AttackType": 0,
"Direction": "in",
"DstIP": "2.2.2.2",
"DstPort": 80,
"HitContent": "www.example.com",
"HitType": "domain",
"IpProtocol": "tcp",
"MemberUid": 0,
"RuleId": "00000000-0000-0000-0000-000000000000",
"RuleName": "test",
"RuleResult": 0,
"RuleSource": 0,
"Sni": "www.example.com",
"SrcIP": "192.0.XX.XX",
"SrcPort": 20206,
"SslCipher": "TLS_AES_128_GCM_SHA256",
"SslErrorIndex": "Certificate",
"SslErrorMsg": "BAD_PACKET_LENGTH",
"SslHandshakeRes": "success",
"SslProtocol": "TLSv1.3",
"StartTime": 1751423362,
"Url": "http://example.com/task3%DF'",
"VulLevel": 0
}
],
"RequestId": "D19D8F70-D64B-5A95-905A-6073BF4A****",
"TotalCount": 12
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ErrorAliUid | Aliuid invalid. | aliuid无效 |
| 400 | ErrorAliUidBlackList | The specified aliUid is invalid. | 无效的aliUid |
| 400 | ErrorSourceCodeError | The source code is invalid. | 无效的source code |
| 400 | ErrorTrafficSlsFirewallType | The firewall type of traffic log is invalid. | 无效的防火墙类型 |
| 400 | ErrorIpFormat | The IP address is invalid. | 无效的IP |
| 400 | ErrorPortError | The port is invalid. | 无效的端口 |
| 400 | ErrorIpProtocolError | The protocol is invalid. | 无效的协议 |
| 400 | ErrorDirectionError | The direction is invalid. | 无效的方向 |
| 400 | ErrorAttackTypeError | The attack type is invalid. | 无效的攻击类型 |
| 400 | ErrorVulLevelFailed | VulLevel has failed. | 漏洞等级失败 |
| 400 | ErrorRuleResultError | The rule result is invalid. | 无效的rule result |
| 400 | ErrorAppIdError | An app ID error occurred. | APP ID错误 |
| 400 | ErrorFlowType | The flow type is invalid. | 无效的flow type |
| 400 | ErrorIspError | The ISP name is invalid. | 运营商错误 |
| 400 | ErrorLocationError | The location name is invalid. | 地区错误 |
| 400 | ErrorDomainName | 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. | 无效的page number 或者 page size |
| 400 | ErrorParameters | A parameter error occurred. | A parameter error occurred. |
| 400 | ErrorSLSLogStore | Failed to get SLS logstore. | 获取SLS logstore失败 |
| 400 | ErrorDBSelectError | A database select error occurred. | 内部错误:数据库查询错误 |
| 400 | ErrorAsyncQueryFailed | The current query has timed out. We suggest shortening the query time range and trying again. | 当前查询已超时,建议缩短查询时间范围后重试。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。