获取文件防护规则列表
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| PageSize |
integer |
否 |
分页查询时,每页显示的数据的最大条数。 |
20 |
| CurrentPage |
integer |
否 |
分页查询时,当前页的页码。 |
1 |
| RuleName |
string |
否 |
规则名称。 |
tetsRule |
| AlertLevel |
integer |
否 |
报警通知级别。取值如下:
|
0 |
| RuleAction |
string |
否 |
规则动作,取值:
|
pass |
| Platform |
string |
否 |
操作系统类型。取值:
|
linux |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
本次调用请求的 ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。 |
BA674E4B-00CF-5DEA-8B92-360862FB**** |
| PageInfo |
object |
分页查询时的页面信息。 |
|
| CurrentPage |
integer |
分页查询时,当前页的页码。 |
1 |
| PageSize |
integer |
分页查询时,显示的每页数据的最大条数。 |
10 |
| TotalCount |
integer |
数据的总条数。 |
45 |
| FileProtectList |
array<object> |
返回的数据列表。 |
|
|
object |
返回的数据列表。 |
||
| Status |
integer |
规则对应的状态。取值如下:
|
1 |
| RuleAction |
string |
规则在客户端的表现形式。取值如下:
|
pass |
| Platform |
string |
操作系统类型。取值:
|
linux |
| EffectInstanceCount |
integer |
受影响资产总数。 |
12 |
| GmtModified |
integer |
最新一次修改时间。 |
1682304179000 |
| SwitchId |
string |
规则对应的开关 ID。 |
FILE_PROTECT_RULE_SWITCH_TYPE_****** |
| GmtCreate |
integer |
创建时间。 |
1682304179000 |
| FilePaths |
array |
监控的文件路径。 |
|
|
string |
监控的文件路径。 |
/usr/* |
|
| FileOps |
array |
对文件进行的操作。 |
|
|
string |
对文件进行的操作。取值如下:
|
READ |
|
| FileTypes |
array |
防护文件类型列表。 |
|
|
string |
防护文件类型列表。 |
txt |
|
| ProcPaths |
array |
对进程监听的路径列表。 |
|
|
string |
对进程监听的路径列表。 |
/usr/local/* |
|
| AlertLevel |
integer |
报警通知级别。取值如下:
|
0 |
| Id |
integer |
规则 ID。 |
1412511 |
| ExcludeUsers |
array |
排除用户列表。 |
|
|
string |
排除用户列表。 |
root |
|
| RuleName |
string |
规则名称。 |
test11 |
示例
正常返回示例
JSON格式
{
"RequestId": "BA674E4B-00CF-5DEA-8B92-360862FB****",
"PageInfo": {
"CurrentPage": 1,
"PageSize": 10,
"TotalCount": 45
},
"FileProtectList": [
{
"Status": 1,
"RuleAction": "pass",
"Platform": "linux",
"EffectInstanceCount": 12,
"GmtModified": 1682304179000,
"SwitchId": "FILE_PROTECT_RULE_SWITCH_TYPE_******",
"GmtCreate": 1682304179000,
"FilePaths": [
"/usr/*"
],
"FileOps": [
"READ"
],
"FileTypes": [
"txt"
],
"ProcPaths": [
"/usr/local/*"
],
"AlertLevel": 0,
"Id": 1412511,
"ExcludeUsers": [
"root"
],
"RuleName": "test11"
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalParameter | Illegal parameter, please check the param. | 参数错误,请检查输入参数。 |
| 500 | ServerError | ServerError | 服务故障,请稍后重试! |
| 403 | NoPermission | caller has no permission | 当前操作未被授权,请联系主账号在RAM控制台进行授权后再执行操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。