云安全中心
保存前校验文件监控策略是否合法,不创建或修改策略:先校验当前账户版本是否支持文件监控,再校验主机归属或分组存在。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | CheckMonitorPolicy | 要执行的操作,取值:CheckMonitorPolicy。 |
Version | String | 是 | 2024-05-08 | API的版本,取值:2024-05-08。 |
AccountID | String | 否 | account-id-001 | 账户 ID;无需传入,服务端以当前登录账号为准 |
AgentIDList | Array of String | 否 | ["agent-id-001"] | 指定主机 ID 列表,可选;非空时逐一校验主机均属于当前账户;与 GroupIDList、AllLinux、AllWindows 共同确定生效范围 |
AllLinux | Boolean | 否 | true | 是否覆盖所有 Linux 主机;校验时不单独检查该开关,仅记录提交值 |
AllWindows | Boolean | 否 | true | 是否覆盖所有 Windows 主机;校验时不单独检查该开关,仅记录提交值 |
GroupIDList | Array of String | 否 | ["group-id-001"] | 指定叶子分组 ID 列表,可选;非空时逐一校验分组存在,不传则不校验分组 |
ID | String | 否 | resource-id-001 | 监控策略唯一 ID,可选;不传时为新增策略场景,校验自定义策略是否达到 20 条上限;传入时为编辑已有策略场景,跳过数量上限校验 |
PolicyPlatform | String | 否 | linux | 操作系统平台(linux/windows);该参数当前不生效,不传不影响校验结果 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Valid | Boolean | true | Valid 标识值,可从对应资源列表接口获取 |
POST /?Action=CheckMonitorPolicy&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 { "AccountID": "account-id-001", "AgentIDList": [ "agent-id-001" ], "AllLinux": true, "AllWindows": true, "GroupIDList": [ "group-id-001" ], "ID": "resource-id-001", "PolicyPlatform": "linux" }
{ "ResponseMetadata": { "RequestId": "20241120165538010234567890", "Action": "CheckMonitorPolicy", "Version": "2024-05-08", "Service": "seccenter", "Region": "cn-beijing" }, "Result": { "Valid": true } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
|---|---|---|---|
400 | MissingParameter | The required parameter %s is missing. | 请求参数缺失,请检查参数是否已正确传入。 |
400 | InvalidParameter | The specified parameter %s is invalid. | 请求参数错误,请检查参数传递内容是否正确。 |
400 | OperationDenied | Operation is denied because the specified resource is in use. | 不允许的操作,请检查当前资源是否被占用。 |
500 | InternalError | The request has failed due to an unknown error. | 服务器内部错误,请稍后重试或联系技术支持。 |
500 | DBOperateError | The request has failed because database return error: %s | 数据库操作异常,请稍后重试或联系技术支持。 |