Creates a detection rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-sas:CreateDetectionRule |
create |
*DetectionRule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region where the Data Management center of Threat Analysis is located. Select a region based on the region where your assets are located. Valid values:
|
cn-hangzhou |
| Lang |
string |
No |
The language of the response. Valid values:
|
zh |
| DetectionRuleName |
string |
Yes |
The name of the detection rule. |
dr-ha1i09ob3zmqrs85**** |
| DetectionRuleDescription |
string |
No |
The description of the detection rule. |
dr-123 |
| DetectionRuleType |
string |
Yes |
The type of the detection rule. Valid values:
|
custom |
| DetectionRuleStatus |
string |
No |
The status of the detection rule. |
0 |
| AlertType |
string |
Yes |
The alert type. |
WebShell |
| AlertLevel |
string |
Yes |
The threat level of the alert. Valid values:
|
1 |
| AlertTacticId |
string |
No |
The tactic phase of the alert. |
TA0042 |
| AlertAttCk |
string |
No |
The ATT&CK stage of the alert. |
Discovery |
| DetectionExpressionType |
string |
No |
The type of the detection rule expression. Valid values:
Valid values:
|
sql |
| DetectionExpressionContent |
string |
No |
The content of the detection rule expression. |
*|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 |
No |
The ID of the log normalization category. |
NETWORK_CATEGORY |
| LogSchemaId |
string |
Yes |
The ID of the log normalization schema. |
API_RISK_ACTIVITY |
| AlertSchemaId |
string |
Yes |
The ID of the alert template for the detection rule. Valid values:
|
ALERT_ACTIVITY |
| ScheduleType |
string |
No |
The scheduling type. Valid values:
|
fixed_rate |
| ScheduleExpression |
string |
No |
The cron expression for scheduling. This parameter is required if you set ScheduleType to cron. |
0/5 * * * * |
| ScheduleMaxRetries |
integer |
No |
The maximum number of retries after a timeout. Valid values: 1 to 100. |
1 |
| ScheduleBeginTime |
integer |
No |
The start time for scheduling. This is a 13-digit UNIX timestamp. |
1733269771123 |
| ScheduleWindow |
string |
No |
The length of the scheduling window. |
5m |
| ScheduleMaxTimeout |
integer |
No |
The maximum timeout period in seconds. Valid values: 60 to 1800. |
60 |
| AlertThresholdPeriod |
string |
No |
The length of the alert threshold period. |
5m |
| AlertThresholdCount |
integer |
No |
The count for the alert threshold. |
10 |
| AlertThresholdGroup |
string |
No |
The list of fields for the alert threshold. Separate multiple fields with commas. |
alert_type,ip |
| IncidentAggregationType |
string |
No |
The event aggregation type. Valid values:
|
window |
| IncidentAggregationExpression |
string |
No |
The configuration of the event aggregation period. |
5m |
| PlaybookUuid |
string |
No |
The UUID of the playbook. |
system_aliyun_clb_process_book |
| PlaybookParameters |
string |
No |
The custom parameters for the playbook. |
{ "ip": { "ip": "124.23.*.*" } } |
| RoleFor |
integer |
No |
The user ID that an administrator uses to switch to the perspective of another member. |
113091674488**** |
| EntityMappings |
string |
No |
The entity mapping configuration. |
[{\"NormalizationSchemaId\":\"host\",\"NormalizationFieldMappings\":[{\"NormalizationFieldName\":\"uuid\",\"MappingFieldName\":\"host\",\"NormalizationFieldType\":\"varchar\"}]}] |
| DetectionRuleTemplateId |
string |
No |
The ID of the detection rule template. |
cfw-out-ip_aegis-netstat |
| DetectionRuleTemplateVersion |
string |
No |
The version of the detection rule template. |
v1.0.0 |
| AlertName |
string |
No |
The alert name. You can use $$ to reference fields from the query output. |
Detected high-frequency multi-type network attacks from $src_ip$ |
| AlertDescription |
string |
No |
The alert description. You can use $$ to reference fields from the query output. |
Alert from: $product_code$, detected network attack from $src_ip$, affected assets include: $dst_ip$ |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The request ID. |
5CC09D0C-1CD7-54BD-A853-DCB2D945**** |
| DetectionRuleId |
string |
The ID of the detection rule. |
dr-ha1i09ob3zmqrs85**** |
Examples
Success response
JSON format
{
"RequestId": "5CC09D0C-1CD7-54BD-A853-DCB2D945****",
"DetectionRuleId": "dr-ha1i09ob3zmqrs85****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.