Retrieves a list of file protection rules.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageSize |
integer |
No |
The maximum number of entries per page for a paged query. |
20 |
| CurrentPage |
integer |
No |
The page number of the current page in a paged query. |
1 |
| RuleName |
string |
No |
The rule name. |
tetsRule |
| AlertLevel |
integer |
No |
The alert notification level. Valid values:
|
0 |
| RuleAction |
string |
No |
The rule action. Valid values:
|
pass |
| Platform |
string |
No |
The operating system type. Valid values:
|
linux |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is a unique identifier generated by Alibaba Cloud for the request. You can use this ID to troubleshoot issues. |
BA674E4B-00CF-5DEA-8B92-360862FB**** |
| PageInfo |
object |
The paging information for the paged query. |
|
| CurrentPage |
integer |
The page number of the current page in a paged query. |
1 |
| PageSize |
integer |
The maximum number of entries per page in a paged query. |
10 |
| TotalCount |
integer |
The total number of entries. |
45 |
| FileProtectList |
array<object> |
The list of returned data. |
|
|
object |
The list of returned data. |
||
| Status |
integer |
The status of the rule. Valid values:
|
1 |
| RuleAction |
string |
The action that the rule performs on the client. Valid values:
|
pass |
| Platform |
string |
The operating system type. Valid values:
|
linux |
| EffectInstanceCount |
integer |
The total number of affected assets. |
12 |
| GmtModified |
integer |
The time when the rule was last modified. |
1682304179000 |
| SwitchId |
string |
The switch ID of the rule. |
FILE_PROTECT_RULE_SWITCH_TYPE_****** |
| GmtCreate |
integer |
The time when the rule was created. |
1682304179000 |
| FilePaths |
array |
The monitored file paths. |
|
|
string |
The monitored file paths. |
/usr/* |
|
| FileOps |
array |
The operations performed on files. |
|
|
string |
The operations performed on files. Valid values:
|
READ |
|
| FileTypes |
array |
The list of protected file types. |
|
|
string |
The list of protected file types. |
txt |
|
| ProcPaths |
array |
The list of monitored process paths. |
|
|
string |
The list of monitored process paths. |
/usr/local/* |
|
| AlertLevel |
integer |
The alert notification level. Valid values:
|
0 |
| Id |
integer |
The rule ID. |
1412511 |
| ExcludeUsers |
array |
The list of excluded users. |
|
|
string |
The list of excluded users. |
root |
|
| RuleName |
string |
The rule name. |
test11 |
Examples
Success response
JSON format
{
"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"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParameter | Illegal parameter, please check the param. | Parameter error, please check the input parameters. |
| 500 | ServerError | ServerError | |
| 403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.