Creates a custom sensitive data detection rule.
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The natural language of the request and response. Valid values:
| zh |
Name | string | Yes | The name of the sensitive data detection rule. | rule-tst |
Category | integer | No | The content type of the sensitive data detection rule. Valid values:
| 0 |
Content | string | Yes | The content of the sensitive data detection rule. The content can be a regular expression or keywords 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|$) |
StatExpress | string | No | The statistical expression. | 1 |
RiskLevelId | long | No | The risk level ID f data that hits the sensitive data detection rule. Valid values:
| 2 |
RuleType | integer | No | The feature type of the rule. Valid values:
| 1 |
ProductCode | string | No | The name of the service to which the columns belong. Valid values include MaxCompute, OSS, ADS, OTS, and RDS. | RDS |
ProductId | long | No | The ID of the service to which the data asset belongs. Valid values include 1, 2, 3, 4, and 5. A value of 1 indicates MaxCompute. A value of 2 indicates Object Storage Service (OSS). A value of 3 indicates AnalyticDB for MySQL. A value of 4 indicates Tablestore. A value of 5 indicates ApsaraDB RDS. | 2 |
WarnLevel | integer | No | The severity level. Valid values:
| 2 |
Description | string | No | The description of the rule. | ID card information |
ContentCategory | integer | No | The type of the audit rule. Valid values include 1, 2, 3, 4, and 5. A value of 1 indicates Attempt to Exploit SQL Injections. A value of 2 indicates Bypass Attempt by Using SQL Injections. A value of 3 indicates Stored Procedure Abuse. A value of 4 indicates Buffer Overflow. A value of 5 indicates Error-based SQL Injection. | 1 |
Status | integer | No | The status of the rule. Valid values:
| 1 |
Target | string | No | The service for which the rule is enabled. Valid values include MaxCompute, OSS, ADS, OTS, and RDS. | MaxCompute |
Response parameters
Example
Normal return example
JSON
Format
{
"Id": 1,
"RequestId": "208B016D-4CB9-4A85-96A5-0B8ED1EBF271"
}
Error codes
For a list of error codes, visit the API error center.