All Products
Search
Document Center

Data Security Center:ModifyRule

Last Updated:Feb 27, 2024

Modifies a custom sensitive data detection rule in Data Security Center (DSC).

Operation description

When you call this operation, you must configure request parameters to specify the rule name, rule ID, and rule content.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

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

  • zh_cn: Simplified Chinese
  • en_us: English
zh_cn
IdlongYes

The ID of the sensitive data detection rule.

You can call the DescribeRules operation to obtain the rule ID.

1****
NamestringYes

The name of the sensitive data detection rule.

You can call the DescribeRules operation to obtain the rule name.

esw
CategoryintegerNo

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

  • 2: regular expression
  • 3: algorithm
  • 5: keyword
2
ContentstringYes

The content of the sensitive data detection rule. You can specify a regular expression, an algorithm, or keywords that are used to match sensitive fields or text.

(?:\\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|$)
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: data detection rule
  • 2: audit rule
  • 3: anomalous event detection rule
1
ProductCodestringNo

The service to which the sensitive data detection rule is applied. Valid values include MaxCompute, OSS, ADS, OTS, and RDS.

RDS
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.

5
WarnLevelintegerNo

The risk level of the alert that is triggered by the sensitive data detection rule. Valid values:

  • 1: low level
  • 2: medium level
  • 3: high level
1
MatchTypeintegerNo

The match type. Valid values:

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

The data assets supported by the sensitive data detection rule. Valid values:

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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

7C3AC882-E5A8-4855-BE77-B6837B695EF1

Examples

Sample success responses

JSONformat

{
  "RequestId": "7C3AC882-E5A8-4855-BE77-B6837B695EF1"
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history