All Products
Search
Document Center

Data Security Center:DescribeRules

Last Updated:Oct 12, 2026

Queries the list of sensitive data detection rules.

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-sddp:DescribeRules

get

*All Resource

*

  • acs:ResourceGroupId
None

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The language type of the request and response messages. Valid values:

  • zh: Chinese.

  • en: English.

zh

PageSize

integer

No

The maximum number of entries to return on each page.

12

CurrentPage

integer

No

The page number for paging in a paged query.

1

CustomType

integer

No

The type of the sensitive data detection rule. Valid values:

  • 0: system built-in.

  • 1: user-defined.

1

Category

integer

No

The content type of the sensitive data detection rule. Valid values:

  • 0: keyword.

  • 2: regular expression.

2

Name

string

No

The name of the sensitive data detection rule. Fuzzy match is supported.

***Rule

RiskLevelId

integer

No

The ID of the sensitivity level for the sensitive data detection rule. Valid values:

  • 1: N/A: No sensitive data is detected.

  • 2: S1: Level 1 sensitive data.

  • 3: S2: Level 2 sensitive data.

  • 4: S3: Level 3 sensitive data.

  • 5: S4: Level 4 sensitive data.

2

RuleType

integer

No

The type of the sensitive data detection rule. Valid values:

  • 1: data detection rule.

  • 2: audit policy.

  • 3: outlier detection rule.

  • 99: custom rule.

1

MatchType

integer

No

The match type. Valid values:

  • 1: rule match.

  • 2: dictionary match.

1

ProductCode

integer

No

The name of the service to which the data asset belongs. Valid values:

  • MaxCompute.

  • OSS.

  • ADS.

  • OTS.

  • RDS.

  • SELF_DB.

MaxCompute

ProductId

integer

No

The ID of the service to which the data asset belongs. Valid values:

  • 1: MaxCompute.

  • 2: OSS.

  • 3: ADS.

  • 4: OTS.

  • 5: RDS.

  • 6: SELF_DB.

1

WarnLevel

integer

No

The risk level. Valid values:

  • 1: low risk.

  • 2: medium risk.

  • 3: high risk.

2

ContentCategory

integer

No

The content type. Valid values:

  • 1: SQL injection exploitation attempt.

  • 2: SQL injection bypass attempt.

  • 3: stored procedure abuse.

  • 4: buffer overflow.

  • 5: error-based SQL injection and others.

1

Status

integer

No

The status. Valid values:

  • 1: normal.

  • 0: disabled.

1

KeywordCompatible

boolean

No

Specifies whether the keywords of the legacy and new versions are compatible. Valid values:

  • true: yes.

  • false: no.

Note

In the legacy version, the value of the Category request parameter for the keyword type is 0. In the new version, the value of the Category request parameter for the keyword type is 5. Specify whether compatibility is required based on your business needs.

true

GroupId

string

No

The parent group of the rule.

4_1

SupportForm

integer

No

The type of data assets supported by the rule. Valid values:

  • 0: all assets.

  • 1: structured assets.

  • 2: unstructured assets.

Note

When you query rules that support structured or unstructured assets, the returned data includes rules that support all assets in addition to the queried asset type.

1

FeatureType

integer

No

[Deprecated] This parameter is deprecated.

2

CooperationChannel

string

No

The external cooperation source of the request. Valid values:

  • DAS.

  • YAOCHI.

DAS

Simplify

boolean

No

Specifies whether to obtain the simplified version of the rules, which includes only the rule names. Valid values:

  • true: yes.

  • false: no.

false

Response elements

Element

Type

Description

Example

object

CurrentPage

integer

The page number of the current page returned.

1

RequestId

string

The ID of the request.

769FB3C1-F4C9-42DF-9B72-7077A8989C13

PageSize

integer

The number of entries returned per page.

12

TotalCount

integer

The total number of entries returned.

23

Items

array<object>

The list of sensitive data detection rules.

object

The details of the sensitive data detection rule.

DisplayName

string

The display name of the account that created the sensitive data detection rule.

****test

Status

integer

The detection status of the sensitive data detection rule. Valid values:

  • 0: disabled.

  • 1: enabled.

1

SupportForm

integer

The Asset Type supported by the rule. Valid values:

  • 0: all assets.

  • 1: structured assets.

  • 2: unstructured assets.

2

WarnLevel

integer

The risk level. Valid values:

  • 1: low risk.

  • 2: medium risk.

  • 3: high risk.

2

UserId

integer

The ID of the account that created the sensitive data detection rule.

0

StatExpress

string

The statistical expression.

1

GmtModified

integer

The time when the sensitive data detection rule was modified. The value is a UNIX timestamp. Unit: milliseconds.

1545277010000

RiskLevelId

integer

The ID of the sensitivity level for the sensitive data detection rule. Valid values:

  • 1: N/A: No sensitive data is detected.

  • 2: S1: Level 1 sensitive data.

  • 3: S2: Level 2 sensitive data.

  • 4: S3: Level 3 sensitive data.

  • 5: S4: Level 4 sensitive data.

2

Description

string

The description of the sensitive data detection rule.

Used to identify IP addresses

ProductId

integer

The ID of the service to which the data asset belongs. Valid values:

  • 1: MaxCompute.

  • 2: OSS.

  • 3: ADS.

  • 4: OTS.

  • 5: RDS.

  • 6: SELF_DB.

2

Name

string

The name of the sensitive data detection rule.

IP address

Content

string

The content of the sensitive data detection rule.

Note

The content is not returned for built-in detection rules, namely, rules whose CustomType is 0.

(?:\\D|^)((?:(?:25[0-4]|2[0-4]\\d|1\\d{2}|[1-9]\\d{1})\\.)(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){2}(?:25[0-5]|2[0-4]\\d|1[0-9]\\d|[1-9]\\d|[1-9]))(?:\\D|$)

Target

string

The name of the service to which the data asset belongs. Valid values:

  • MaxCompute.

  • OSS.

  • ADS.

  • OTS.

  • RDS.

  • SELF_DB.

MaxCompute

LoginName

string

The logon name of the account that created the sensitive data detection rule.

det1111

CategoryName

string

The name of the content type to which the sensitive data detection rule belongs.

Regular expression

ContentCategory

string

The content type. Valid values:

  • 1: SQL injection exploitation attempt.

  • 2: SQL injection bypass attempt.

  • 3: stored procedure abuse.

  • 4: buffer overflow.

  • 5: error-based SQL injection and others.

1

HitTotalCount

integer

The number of hits.

3

GroupId

string

The parent group of the rule.

4_1

CustomType

integer

The type of the sensitive data detection rule. Valid values:

  • 0: system built-in.

  • 1: user-defined.

1

RiskLevelName

string

The name of the risk level for the sensitive data detection rule. Valid values:

  • N/A: No sensitive data is detected.

  • S1: Level 1 sensitive data.

  • S2: Level 2 sensitive data.

  • S3: Level 3 sensitive data.

  • S4: Level 4 sensitive data.

S2

GmtCreate

integer

The time when the sensitive data detection rule was created. The value is a UNIX timestamp. Unit: milliseconds.

1545277010000

Category

integer

The content type of the sensitive data detection rule. Valid values:

  • 0: keyword.

  • 2: regular expression.

2

MajorKey

string

The key of the primary dimension.

key

Id

integer

The unique ID of the saved sensitive data detection rule.

20000

ProductCode

string

The name of the service to which the data asset belongs. Valid values:

  • MaxCompute.

  • OSS.

  • ADS.

  • OTS.

  • RDS.

  • SELF_DB.

MaxCompute

MatchType

integer

The match type. Valid values:

  • 1: rule match.

  • 2: dictionary match.

1

TemplateRuleIds

string

The IDs of the templates associated with the sensitive data audit.

1

ModelRuleIds

string

The IDs of the models associated with the sensitive data audit.

1452

ThreatAnalysisStatus

integer

The status of the threat analysis mode. Valid values: 0: disabled. 1: enabled.

Valid values:

  • 0 :

    Disabled.

  • 1 :

    Enabled.

0

AuditMode

integer

The audit mode.

0

Examples

Success response

JSON format

{
  "CurrentPage": 1,
  "RequestId": "769FB3C1-F4C9-42DF-9B72-7077A8989C13",
  "PageSize": 12,
  "TotalCount": 23,
  "Items": [
    {
      "DisplayName": "****test",
      "Status": 1,
      "SupportForm": 2,
      "WarnLevel": 2,
      "UserId": 0,
      "StatExpress": "1",
      "GmtModified": 1545277010000,
      "RiskLevelId": 2,
      "Description": "Used to identify IP addresses",
      "ProductId": 2,
      "Name": "IP address",
      "Content": "(?:\\\\D|^)((?:(?:25[0-4]|2[0-4]\\\\d|1\\\\d{2}|[1-9]\\\\d{1})\\\\.)(?:(?:25[0-5]|2[0-4]\\\\d|[01]?\\\\d?\\\\d)\\\\.){2}(?:25[0-5]|2[0-4]\\\\d|1[0-9]\\\\d|[1-9]\\\\d|[1-9]))(?:\\\\D|$)",
      "Target": "MaxCompute",
      "LoginName": "det1111",
      "CategoryName": "Regular expression",
      "ContentCategory": "1",
      "HitTotalCount": 3,
      "GroupId": "4_1",
      "CustomType": 1,
      "RiskLevelName": "S2",
      "GmtCreate": 1545277010000,
      "Category": 2,
      "MajorKey": "key",
      "Id": 20000,
      "ProductCode": "MaxCompute",
      "MatchType": 1,
      "TemplateRuleIds": "1",
      "ModelRuleIds": "1452",
      "ThreatAnalysisStatus": 0,
      "AuditMode": 0
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.