添加或者更新自定义规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
yundun-sas:PostCustomizeRule |
create |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
Id |
integer |
否 |
自定义规则 ID。 |
123456789 |
RuleName |
string |
否 |
规则名称。 |
waf_scan |
RuleDesc |
string |
否 |
规则描述。 |
this rule is for waf scan |
ThreatLevel |
string |
否 |
威胁等级。取值:
|
remind |
AttCk |
string |
否 |
att&ck。 |
T1595.002 Vulnerability Scanning |
AlertType |
string |
否 |
威胁类型。 |
WEBSHELL |
AlertTypeMds |
string |
否 |
威胁类型美杜莎 Code。 |
${siem_rule_type_process_abnormal_command} |
LogType |
string |
否 |
规则对应的日志类型。 |
ALERT_ACTIVITY |
LogTypeMds |
string |
否 |
规则对应的日志类型美杜莎 Code。 |
${security_event_config.event_name.webshellName_clientav} |
LogSource |
string |
否 |
规则对应的日志源。 |
cloud_siem_aegis_sas_alert |
LogSourceMds |
string |
否 |
规则对应的日志源美杜莎 Code。 |
${sas.cloudsiem.prod.cloud_siem_aegis_sas_alert} |
RuleCondition |
string |
否 |
规则查询条件 json。 |
[[{"not":false,"left":"alert_name","operator":"=","right":"WEBSHELL"}]] |
RuleGroup |
string |
否 |
日志聚合字段,json 数组格式。 |
["asset_id"] |
RuleThreshold |
string |
否 |
规则阈值配置 json。 |
{"aggregateFunction":"count","aggregateFunctionName":"count","field":"activity_name","operator":"<=","value":1} |
QueryCycle |
string |
否 |
规则窗口长度。 |
{"time":"1","unit":"HOUR"} |
EventTransferSwitch |
integer |
否 |
告警是否转换事件开关。取值:
|
1 |
EventTransferType |
string |
否 |
事件生成方式。取值:
|
allToSingle |
EventTransferExt |
string |
否 |
事件生成扩展信息,当 eventTransferType 值为 allToSingle 时,该字段有值,表示告警聚合窗口的周期长度以及周期单位。 |
{"time":"1","unit":"MINUTE"} |
RoleType |
integer |
否 |
视图类型。
|
1 |
RoleFor |
integer |
否 |
管理员切换成其他成员视角的用户 ID。 |
113091674488**** |
RegionId |
string |
否 |
威胁分析的数据管理中心所在地。您需要根据资产所在地域,选择管理中心所在地。取值:
|
cn-hangzhou |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
BaseResponse |
||
Data |
object |
请求返回值。 |
123456 |
Id |
integer |
自定义规则 id。 |
123456789 |
GmtCreate |
string |
自定义规则创建时间。 |
2021-01-06 16:37:29 |
GmtModified |
string |
自定义规则最后更新时间。 |
2021-01-06 16:37:29 |
Aliuid |
integer |
购买威胁分析产品的阿里云账号 ID。 |
127608589417**** |
RuleName |
string |
规则名称。 |
waf_scan |
RuleDesc |
string |
规则描述。 |
this rule is for waf scan |
RuleType |
string |
规则类型。取值:
|
customize |
ThreatLevel |
string |
威胁等级。取值:
|
remind |
AlertType |
string |
威胁类型。 |
WEBSHELL |
AlertTypeMds |
string |
威胁类型美杜莎 Code。 |
${siem_rule_type_process_abnormal_command} |
LogType |
string |
规则对应的日志类型。 |
ALERT_ACTIVITY |
LogTypeMds |
string |
规则对应的日志类型美杜莎 Code。 |
${security_event_config.event_name.webshellName_clientav} |
LogSource |
string |
规则对应的日志源。 |
cloud_siem_aegis_sas_alert |
LogSourceMds |
string |
规则对应的日志源美杜莎 code。 |
${sas.cloudsiem.prod.cloud_siem_aegis_sas_alert} |
RuleCondition |
string |
规则查询条件 json(需要对 html 转义字符进行反向转义)。 |
[[{"not":false,"left":"alert_name","operator":"=","right":"WEBSHELL"}]] |
RuleGroup |
string |
日志聚合字段,json 数组格式(需要对 html 转义字符进行反向转义)。 |
["asset_id"] |
RuleThreshold |
string |
规则阈值配置 json(需要对 html 转义字符进行反向转义)。 |
{"aggregateFunction":"count","aggregateFunctionName":"count","field":"activity_name","operator":"<=","value":1} |
QueryCycle |
string |
规则窗口长度(需要对 html 转义字符进行反向转义)。 |
{"time":"1","unit":"HOUR"} |
AttCk |
string |
告警附加字段 attck |
T1595.002 Vulnerability Scanning |
EventTransferSwitch |
integer |
告警是否转换事件开关。取值:
|
1 |
EventTransferType |
string |
事件生成方式。取值:
|
allToSingle |
EventTransferExt |
string |
事件生成扩展信息,当 eventTransferType 值为 allToSingle 时,该字段有值,表示告警聚合窗口的周期长度以及周期单位,(需要对 html 转义字符进行反向转义)。 |
{"time":"1","unit":"MINUTE"} |
Status |
integer |
规则状态。取值:
|
0 |
DataType |
integer |
自动化响应规则条件字段数据类型。 |
varchar |
Success |
boolean |
请求是否成功。取值:
|
true |
Code |
integer |
请求状态码。 |
200 |
Message |
string |
请求返回消息。 |
success |
RequestId |
string |
请求 ID。 |
9AAA9ED9-78F4-5021-86DC-D51C7511**** |
示例
正常返回示例
JSON
格式
{
"Data": {
"Id": 123456789,
"GmtCreate": "2021-01-06 16:37:29",
"GmtModified": "2021-01-06 16:37:29",
"Aliuid": 0,
"RuleName": "waf_scan",
"RuleDesc": "this rule is for waf scan",
"RuleType": "customize",
"ThreatLevel": "remind",
"AlertType": "WEBSHELL",
"AlertTypeMds": "${siem_rule_type_process_abnormal_command}",
"LogType": "ALERT_ACTIVITY",
"LogTypeMds": "${security_event_config.event_name.webshellName_clientav}",
"LogSource": "cloud_siem_aegis_sas_alert",
"LogSourceMds": "${sas.cloudsiem.prod.cloud_siem_aegis_sas_alert}",
"RuleCondition": "[[{"not":false,"left":"alert_name","operator":"=","right":"WEBSHELL"}]]",
"RuleGroup": "["asset_id"]",
"RuleThreshold": "{"aggregateFunction":"count","aggregateFunctionName":"count","field":"activity_name","operator":"<=","value":1}",
"QueryCycle": "{"time":"1","unit":"HOUR"}",
"AttCk": "T1595.002 Vulnerability Scanning",
"EventTransferSwitch": 1,
"EventTransferType": "allToSingle",
"EventTransferExt": "{"time":"1","unit":"MINUTE"}",
"Status": 0,
"DataType": 0
},
"Success": true,
"Code": 200,
"Message": "success",
"RequestId": "9AAA9ED9-78F4-5021-86DC-D51C7511****"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | CloudSiemCustomizeRuleUpdateExcepiton | this customize rule can only update in init status. | |
400 | CloudSiemCustomizeRuleConditionExceedExcepiton | the number of rule conditions cannot exceed 100. | |
400 | CloudSiemCustomizeRuleDuplicateRuleNameExcepiton | the rule name is duplicated. | |
500 | InternalError | The request processing has failed due to some unknown error. | 服务发生某些未知错误,请稍后再试 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。