All Products
Search
Document Center

Data Security Center:DescribeRules

Last Updated:Oct 17, 2024

Queries sensitive data detection rules.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sddp:DescribeRulesget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the content within the request and response. Valid values:

  • zh: Chinese
  • en: English
zh
PageSizeintegerNo

The number of entries to return on each page.

12
CurrentPageintegerNo

The page number of the page to return.

1
CustomTypeintegerNo

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

  • 0: built-in rule
  • 1: custom rule
1
CategoryintegerNo

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

  • 0: keyword
  • 2: regular expression
2
NamestringNo

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

\*\*\* rule
RiskLevelIdlongNo

The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:

  • 1: N/A, which indicates that no sensitive data is detected.
  • 2: S1, which indicates the low sensitivity level.
  • 3: S2, which indicates the medium sensitivity level.
  • 4: S3, which indicates the high sensitivity level.
  • 5: S4, which indicates the highest sensitivity level.
2
RuleTypeintegerNo

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

  • 1: sensitive data detection rule
  • 2: audit rule
  • 3: anomalous event detection rule
  • 99: custom rule
1
MatchTypeintegerNo

The match type. Valid values:

  • 1: rule-based match
  • 2: dictionary-based match
1
ProductCodeintegerNo

The name of the service to which the data asset belongs. Valid values include MaxCompute, OSS, ADS, OTS, and RDS.

MaxCompute
ProductIdlongNo

The ID of the service to which the sensitive data detection rule is applied. Valid values include 1, 2, 3, 4, and 5. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.

1
WarnLevelintegerNo

The severity level of the alert. Valid values:

  • 1: low
  • 2: medium
  • 3: high
2
ContentCategoryintegerNo

The type of the content in the sensitive data detection rule. Valid values include 1, 2, 3, 4, and 5. The value 1 indicates attempts to exploit SQL injections. The value 2 indicates bypass by using SQL injections. The value 3 indicates abuse of stored procedures. The value 4 indicates buffer overflow. The value 5 indicates SQL injections based on errors.

1
StatusintegerNo

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

  • 1: enabled
  • 0: disabled
1
KeywordCompatiblebooleanNo

Specifies whether to allow earlier versions of request parameters to support keywords that are supported in later versions of request parameters. Valid values:

  • true: yes
  • false: no
Note To specify keywords as the content type of the sensitive data detection rule, you can set the Category parameter to 0 for earlier versions of request parameters and set the Category parameter to 5 for later versions of request parameters. You can specify the KeywordCompatible parameter based on your business requirements.
true
GroupIdstringNo

The parent group type of the rule.

4_1
SupportFormintegerNo

The type of the data asset. Valid values:

  • 0: all data assets
  • 1: structured data asset
  • 2: unstructured data asset
Note If you set the parameter to 1 or 2, rules that support all data assets and rules that support the queried data asset type are returned.
1
FeatureTypeintegerNo

This parameter is deprecated.

2

Response parameters

ParameterTypeDescriptionExample
object
CurrentPageinteger

The page number of the returned page.

1
RequestIdstring

The ID of the request.

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

The number of entries returned per page.

12
TotalCountinteger

The total number of entries returned.

23
Itemsarray<object>

An array that consists of the sensitive data detection rules.

Ruleobject

The details of the sensitive data detection rule.

DisplayNamestring

The display name of the account that is used to create the sensitive data detection rule.

****test
Statusinteger

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

  • 0: disabled
  • 1: enabled
1
SupportForminteger

The data asset type that is supported by the sensitive data detection rule. Valid values:

  • 0: all data assets
  • 1: structured data assets
  • 2: unstructured data assets
2
WarnLevelinteger

The severity level. Valid values:

  • 1: low
  • 2: medium
  • 3: high
2
UserIdlong

The ID of the account that is used to create the sensitive data detection rule.

0
StatExpressstring

The statistical expression.

1
GmtModifiedlong

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

1545277010000
RiskLevelIdlong

The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:

  • 1: N/A, which indicates that no sensitive data is detected.
  • 2: S1, which indicates the low sensitivity level.
  • 3: S2, which indicates the medium sensitivity level.
  • 4: S3, which indicates the high sensitivity level.
  • 5: S4, which indicates the highest sensitivity level.
2
Descriptionstring

The description of the sensitive data detection rule.

The sensitive data detection rule is used to detect IP addresses.
ProductIdlong

The ID of the service to which the sensitive data detection rule is applied. Valid values include 1, 2, 3, 4, and 5. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.

2
Namestring

The name of the sensitive data detection rule.

IP address
Contentstring

The content in the sensitive data detection rule.

Note A built-in detection rule whose CustomType is 0 does not return the content of the rule.
(?:\\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|$)
Targetstring

The name of the service to which the data asset belongs. Valid values include MaxCompute, OSS, ADS, OTS, and RDS.

MaxCompute
LoginNamestring

The username of the account that is used to create the sensitive data detection rule.

det1111
CategoryNamestring

The name of the content type of the sensitive data detection rule.

Regular expression
ContentCategorystring

The type of the content in the sensitive data detection rule. Valid values include 1, 2, 3, 4, and 5. The value 1 indicates attempts to exploit SQL injections. The value 2 indicates bypass by using SQL injections. The value 3 indicates abuse of stored procedures. The value 4 indicates buffer overflow. The value 5 indicates SQL injections based on errors.

1
HitTotalCountinteger

The number of times that the sensitive data detection rule is hit.

3
GroupIdstring

The parent group type of the rule.

4_1
CustomTypeinteger

The type of the sensitive data detection rule.

  • 0: built-in rule
  • 1: custom rule
1
RiskLevelNamestring

The sensitivity level of data that hits the sensitive data detection rule. Valid values:

  • N/A: indicates that no sensitive data is detected.
  • S1: indicates the low sensitivity level.
  • S2: indicates the medium sensitivity level.
  • S3: indicates the high sensitivity level.
  • S4: indicates the highest sensitivity level.
S2
GmtCreatelong

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

1545277010000
Categoryinteger

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

  • 0: keyword
  • 2: regular expression
2
MajorKeystring

The key of the primary dimension.

key
Idlong

The ID of the sensitive data detection rule.

20000
ProductCodestring

The name of the service to which the data asset belongs. Valid values include MaxCompute, OSS, ADS, OTS, and RDS.

MaxCompute
MatchTypeinteger

The match type. Valid values:

  • 1: rule-based match
  • 2: dictionary-based match
1

Examples

Sample success responses

JSONformat

{
  "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": "The sensitive data detection rule is used to detect IP addresses.\n",
      "ProductId": 2,
      "Name": "IP address\n",
      "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\n",
      "ContentCategory": "1",
      "HitTotalCount": 3,
      "GroupId": "4_1",
      "CustomType": 1,
      "RiskLevelName": "S2",
      "GmtCreate": 1545277010000,
      "Category": 2,
      "MajorKey": "key",
      "Id": 20000,
      "ProductCode": "MaxCompute",
      "MatchType": 1
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-25The request parameters of the API has changedView Change Details
2023-07-17The request parameters of the API has changedView Change Details