更新检测规则。
接口说明
入参 JsonConfig 是一个非常复杂的 JSON 配置,为此我们提供了辅助工具类帮助具体配置示例,请参考 Demo 。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
yundun-sas:UpdateDetectionRule | update | *DetectionRule acs:yundun-sas::{#accountId}:detection/{#DetectionRuleId} |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 否 | 威胁分析的数据管理中心所在地。您需要根据资产所在地域,选择管理中心所在地。取值:
| cn-hangzhou |
Lang | string | 否 | 返回消息的语言类型。取值:
| zh |
DetectionRuleId | string | 是 | 检测规则 ID。 | jndi-attack-success_http_dns |
DetectionRuleName | string | 否 | 检测规则名称。 | CTDR Port Scan Behavior |
DetectionRuleDescription | string | 否 | 检测规则描述。 | Check the enumeration behavior of local system groups. An attacker may attempt to find the Local Systems group and its permission settings. |
DetectionRuleType | string | 是 | 检测规则类型。取值:
| custom |
DetectionRuleStatus | string | 否 | 检测规则状态。 | enabled |
AlertType | string | 否 | 告警类型。 | siem_rule_type_alert_storm |
AlertLevel | string | 否 | 告警威胁等级。 取值:
| 1 |
AlertTacticId | string | 否 | 告警战术阶段。 | TA0042 |
AlertAttCk | string | 否 | 告警 Att&Ck。 | Discovery |
DetectionExpressionType | string | 否 | 检测规则表达式内容。 | sql |
DetectionExpressionContent | string | 否 | 检测规则表达式内容。 | *|set session mode=scan;SELECT * FROM log WHERE schema = 'PROCESS_START_ACTIVITY' AND ( proc_path LIKE '%/groups' OR ( ( proc_path LIKE '%/cat' OR proc_path LIKE '%/head' OR proc_path LIKE '%/tail' OR proc_path LIKE '%/more' ) AND cmdline LIKE '%/etc/group%' ) ) |
LogCategoryId | string | 否 | 日志规范化类别 ID。 | NETWORK_CATEGORY |
LogSchemaId | string | 否 | 日志规范化方案 ID。 | API_RISK_ACTIVITY |
AlertSchemaId | string | 否 | 检测规则告警模版 ID。 | ALERT_ACTIVITY |
ScheduleType | string | 否 | 调度类型。取值:
| fixed_rate |
ScheduleExpression | string | 否 | 调度 Cron 表达式,ScheduleType 取值为 cron 时需填写。 | 1h |
ScheduleMaxRetries | integer | 否 | 超时最大重试次数,取值 1~100。 | 1 |
ScheduleBeginTime | long | 否 | 调度开始时间(13 位时间戳)。 | 1733269771123 |
ScheduleWindow | string | 否 | 调度窗口长度。 | 5m |
ScheduleMaxTimeout | integer | 否 | 超时最长时间,单位秒,取值 60~1800。 | 60 |
AlertThresholdPeriod | string | 否 | 告警阈值周期长度。 | 5m |
AlertThresholdCount | integer | 否 | 告警阈值次数。 | 10 |
AlertThresholdGroup | string | 否 | 告警阈值字段列表,以英文逗号分隔。 | alert_type,ip |
IncidentAggregationType | string | 否 | 事件聚合类型。取值:
| window |
IncidentAggregationExpression | string | 否 | 事件聚合周期配置。 | 60m |
PlaybookParameters | string | 否 | 剧本用户自定义参数。 | { "ip": { "ip": "124.23.*.*" } } |
PlaybookUuid | string | 否 | 剧本唯一标识。 | 31568394-7a86-487c-b8ec-b3f42b59**** |
EntityMappings | string | 否 | 实体映射配置。 | [{\"NormalizationSchemaId\":\"host\",\"NormalizationFieldMappings\":[{\"NormalizationFieldName\":\"uuid\",\"MappingFieldName\":\"host\",\"NormalizationFieldType\":\"varchar\"}]}] |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "B88A2D41-87B8-537E-A7D3-3416A39F****"
}
错误码
HTTP status code | 错误码 | 错误信息 |
---|---|---|
400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
访问错误中心查看更多错误码。