All Products
Search
Document Center

Security Center:UpdateDetectionRule

Last Updated:Dec 08, 2025

Updates a detection rule.

Operation description

Because this operation uses complex request parameters, a supporting tool class is provided to assist with the JSON configuration. For an example, see the Demo.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-sas:UpdateDetectionRule

update

*DetectionRule

acs:yundun-sas::{#accountId}:detection/{#DetectionRuleId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region of the Data Management center for Threat Analysis. Select the region where your assets are located. Valid values:

  • cn-hangzhou: The Chinese mainland.

  • ap-southeast-1: Regions outside the Chinese mainland.

cn-hangzhou

Lang

string

No

The language of the response. Valid values:

  • zh (default): Chinese.

  • en: English.

zh

DetectionRuleId

string

Yes

The ID of the detection rule.

jndi-attack-success_http_dns

DetectionRuleName

string

No

The name of the detection rule.

CTDR Port Scan Behavior

DetectionRuleDescription

string

No

The description of the detection rule.

Check the enumeration behavior of local system groups. An attacker may attempt to find the Local Systems group and its permission settings.

DetectionRuleType

string

Yes

The type of the detection rule. Valid values:

  • preset: a preset detection rule.

  • custom: a custom detection rule.

  • custom_template: a rule template.

custom

DetectionRuleStatus

string

No

The status of the detection rule.

enabled

AlertType

string

No

The type of the alert.

siem_rule_type_alert_storm

AlertLevel

string

No

The threat level of the alert. Valid values:

  • 5: Critical.

  • 4: Important.

  • 3: Medium.

  • 2: Low.

  • 1: Informational.

1

AlertTacticId

string

No

The ATT&CK tactic ID of the alert.

TA0042

AlertAttCk

string

No

The ATT&CK tactic of the alert.

Discovery

DetectionExpressionType

string

No

The type of the detection expression.

sql

DetectionExpressionContent

string

No

The content of the detection 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

No

The ID of the log normalization schema.

API_RISK_ACTIVITY

AlertSchemaId

string

No

The ID of the alert template for the detection rule.

ALERT_ACTIVITY

ScheduleType

string

No

The scheduling type. Valid values:

  • fixed_rate: fixed interval.

  • cron: cron expression.

fixed_rate

ScheduleExpression

string

No

The cron expression for scheduling. This parameter is required when you set `ScheduleType` to `cron`.

1h

ScheduleMaxRetries

integer

No

The maximum number of retries after a timeout. The value must be between 1 and 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. Unit: seconds. The value must be between 60 and 1800.

60

AlertThresholdPeriod

string

No

The period for the alert threshold.

5m

AlertThresholdCount

integer

No

The number of alerts for the alert threshold.

10

AlertThresholdGroup

string

No

The fields for the alert threshold. Separate multiple fields with commas.

alert_type,ip

IncidentAggregationType

string

No

The type of event aggregation. Valid values:

  • none: Events are not generated.

  • graph_compute: graph computing (supported by predefined rules).

  • expert: expert rule.

  • passthrough: pass-through (one-to-one mapping with alerts).

  • window: window-based aggregation of similar events.

window

IncidentAggregationExpression

string

No

The configuration of the event aggregation period.

60m

PlaybookParameters

string

No

The custom parameters for the playbook.

{ "ip": { "ip": "124.23.*.*" } }

PlaybookUuid

string

No

The unique ID of the playbook.

31568394-7a86-487c-b8ec-b3f42b59****

EntityMappings

string

No

The entity mapping configuration.

[{\"NormalizationSchemaId\":\"host\",\"NormalizationFieldMappings\":[{\"NormalizationFieldName\":\"uuid\",\"MappingFieldName\":\"host\",\"NormalizationFieldType\":\"varchar\"}]}]

AlertName

string

No

The name of the alert. You can use `$$` to reference fields from the query output.

Detected high-frequency multi-type network attacks from $src_ip$

AlertDescription

string

No

The description of the alert. 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 ID of the request.

B88A2D41-87B8-537E-A7D3-3416A39F****

Examples

Success response

JSON format

{
  "RequestId": "B88A2D41-87B8-537E-A7D3-3416A39F****"
}

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.