分页查询当前账户的文件监控策略及其状态、生效范围和更新时间;筛选条件不传时查询全部策略,时间字段为秒级 Unix 时间戳。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | ListMonitorPolicies | 要执行的操作,取值:ListMonitorPolicies。 |
Version | String | 是 | 2024-05-08 | API的版本,取值:2024-05-08。 |
AgentID | String | 否 | agent-id-001 | 主机 Agent ID,可从主机资产列表获取 |
PageSize | Long | 是 | 20 | 每页记录数,取值范围为 1~5000 |
PolicyName | String | 否 | example-name | 策略名称 |
SortBy | String | 否 | LastHeartbeatTime | 排序字段;不传时使用接口默认排序 |
FSuffixList | Array of String | 否 | ["php5"] | 文件类型 php5, jsp, mp4, jpeg, ttf, pdf, ico, gif, png, jpg, toml, yaml, xml, js, css, jspx, htm, html, aspx, asp |
PolicyPlatform | String | 否 | linux | 策略平台 linux windows |
GroupIDList | Array of String | 否 | ["group-id-001"] | 分组ID列表 |
HostName | String | 否 | host-001 | 主机名 |
OperatorList | Array of String | 否 | ["write","remove"] | 监控操作:修改write 删除remove 新增create 重命名rename 读取read |
PageNumber | Long | 是 | 1 | 翻页页码,取值范围为 1 及以上 |
Path | String | 否 | /var/log/example.log | 监控路径 |
IP | String | 否 | 192.0.2.10 | 主机IP |
PolicyTypeList | Array of String | 否 | ["default"] | 策略类型 自定义策略custom 默认策略 default |
SortOrder | String | 否 | Desc | 排序顺序
|
Tags | Array of String | 否 | ["production"] | 主机标签 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Data | Array of Object | -- | 分页业务数据,具体元素结构见各接口响应声明 |
PageNumber | Long | 1 | 当前页面 |
PageSize | Long | 20 | 页面大小 |
TotalCount | Long | 1 | 全部数据条数 |
POST /?Action=ListMonitorPolicies&Version=2024-05-08 HTTP/1.1 Host: seccenter.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20241120T080538Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241120/cn-beijing/seccenter/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "AgentID": "agent-id-001", "FSuffixList": [ "php5" ], "GroupIDList": [ "group-id-001" ], "HostName": "host-001", "IP": "192.0.2.10", "OperatorList": [ "write", "remove" ], "PageNumber": 1, "PageSize": 20, "Path": "/var/log/example.log", "PolicyName": "example-name", "PolicyPlatform": "linux", "PolicyTypeList": [ "default" ], "SortBy": "LastHeartbeatTime", "SortOrder": "Desc", "Tags": [ "production" ] }
{ "ResponseMetadata": { "RequestId": "20241120165538010234567890", "Action": "ListMonitorPolicies", "Version": "2024-05-08", "Service": "seccenter", "Region": "cn-beijing" }, "Result": { "Data": [ { "AccountID": "account-id-001", "AgentCount": 1, "AgentIDList": [ "agent-id-001" ], "AllFSuffix": true, "AllLinux": true, "AllWindows": true, "DirectoryCount": 1, "DirectoryList": [ { "FollowLink": true, "Fpath": "/var/log/example.log", "OnContainer": true, "SpChild": "sp-child-sample", "WatchMode": 1 } ], "FSuffixList": [ ".log", ".conf" ], "GroupCount": 1, "GroupIDList": [ "group-id-001" ], "HarmLevel": "critical", "ID": "resource-id-001", "OperatorList": [ "write", "remove" ], "PolicyName": "example-name", "PolicyNameEN": "example-name", "PolicyPlatform": "linux", "PolicyType": "default", "SingleGroupPath": "/production/web", "SingleHostName": "host-001", "Status": "close" } ], "PageNumber": 1, "PageSize": 20, "TotalCount": 1 } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
400 | MissingParameter | 请求参数缺失,请检查参数是否已正确传入。 |
400 | InvalidParameter | 请求参数错误,请检查参数传递内容是否正确。 |
400 | OperationDenied | 不允许的操作,请检查当前资源是否被占用 |
500 | InternalError | 服务器内部错误,请稍后重试或联系技术支持。 |
500 | DBOperateError | 数据库操作异常,请稍后重试或联系技术支持。 |