获取文件保护规则
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Id |
integer |
否 |
策略 ID。 |
123 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
79CFF74D-E967-5407-8A78-EE03B925**** |
| Data |
object |
返回数据。 |
|
| RuleAction |
string |
规则在客户端的表现形式。取值如下:
|
pass |
| RuleName |
string |
规则名称。 |
test |
| SwitchId |
string |
规则对应的开关 ID。 |
USER-CONTAINER-RULE-SWITCH-TYPE_*** |
| Id |
integer |
规则 ID。 |
3119 |
| AlertLevel |
integer |
报警通知级别。取值如下:
|
1 |
| FileOps |
array |
对文件进行的操作。 |
|
|
string |
对文件进行的操作。取值如下:
|
WRITE |
|
| FileTypes |
array |
防护文件类型。 |
|
|
string |
防护文件类型。 |
txt |
|
| FilePaths |
array |
监听的文件路径,支持通配。 |
|
|
string |
监听的文件路径,支持通配。 |
/usr/* |
|
| ProcPaths |
array |
进程路径,支持通配。 |
|
|
string |
进程路径,支持通配。 |
/usr/local/* |
|
| ExcludeUsers |
array |
排除用户列表。 |
|
|
string |
排除用户列表。 |
root |
|
| Status |
integer |
规则状态。取值:
|
0 |
| Platform |
string |
操作系统类型。取值:
|
linux |
示例
正常返回示例
JSON格式
{
"RequestId": "79CFF74D-E967-5407-8A78-EE03B925****",
"Data": {
"RuleAction": "pass",
"RuleName": "test",
"SwitchId": "USER-CONTAINER-RULE-SWITCH-TYPE_***",
"Id": 3119,
"AlertLevel": 1,
"FileOps": [
"WRITE"
],
"FileTypes": [
"txt"
],
"FilePaths": [
"/usr/*"
],
"ProcPaths": [
"/usr/local/*"
],
"ExcludeUsers": [
"root"
],
"Status": 0,
"Platform": "linux"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalParameter | Illegal parameter, please check the param. | 参数错误,请检查输入参数。 |
| 500 | ServerError | ServerError | 服务故障,请稍后重试! |
| 403 | NoPermission | caller has no permission | 当前操作未被授权,请联系主账号在RAM控制台进行授权后再执行操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。