Adds a sensitive field that is defined based on the category and sensitivity level of data in Data Security Guard.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dataworks:AddRecognizeRule | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TenantId | string | Yes | The tenant ID. To obtain the tenant ID, perform the following steps: Log on to the DataWorks console. Find your workspace and go to the DataStudio page. On the DataStudio page, click the logon username in the upper-right corner and click User Info in the Menu section. | 10241024 |
AccountName | string | Yes | The Alibaba Cloud account that is used to create a sensitive data identification rule. Enter the username of the Alibaba Cloud account. | dsg-uat |
SensitiveName | string | Yes | The name of the custom sensitive field. Enter a string that is less than 128 characters in length. | |
TemplateId | string | Yes | The template ID. You can call the QueryDefaultTemplate operation to obtain the template ID. | e1970541-6cf5-4d23-b101-d5b66f6e1024 |
NodeId | string | Yes | The ID of the data category. You can call the QuerySensClassification operation to query the ID of all data categories. Then, you can select a data category to create a sensitive field. Enter the ID of the selected data category. | 0ce67949-0810-400f-a24a-cc5ffafe1024 |
NodeParent | string | Yes | The information about the parent data category of the current data category. You can call the QuerySensClassification operation to obtain the ID of a data category. | |
Level | string | Yes | The sensitivity level of the sensitive field. You can select one from all sensitivity levels that are defined in a template as the sensitivity level of the sensitive field, such as level 1 to level 10. | 1 |
LevelName | string | No | The name of the sensitivity level. You can call the QueryDefaultTemplate operation to obtain the name of the sensitivity level in the related template. | |
SensitiveDescription | string | No | The description of the sensitive field. Enter a string that is less than 128 characters in length. | |
OperationType | integer | Yes | The type of the arithmetic operation. Valid values:
| 0 |
RecognizeRulesType | string | No | The type of the sensitive data identification rule. Valid values:
| 1 |
RecognizeRules | string | No | The content of the sensitive data identification rule. You can call the QuerySensNodeInfo operation to query the value of the current parameter for a built-in sensitive field. | {"contentRule":{"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.GenderCond"},"_clazz":"com.alipay.dsg.dal.model.RuleContent"} |
ContentScan | string | No | Identifies content. You can call the QuerySensNodeInfo operation to query the value of the current parameter for a built-in sensitive field. | {"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.NationalityCond"} |
HitThreshold | integer | No | The hit ratio threshold. If more than 60%, which is a sample hit ratio threshold, of all sample data records hit the Name Entity Recognition (NER) model, the sensitive field is hit. The value can be an integer from 0 to 100. | 50 |
ColScan | string | No | Scans fields. The system identifies only fields that are assigned with values.
| default.qujian.* |
ColExclude | string | No | Excludes fields. The system does not identify fields that are assigned with values.
| default.qujian.*6 |
CommentScan | string | No | Scans content. The value is the text of each field comment in your data asset. Fuzzy match is supported. | test |
Status | integer | No | The status of the sensitive field. Valid values:
| 0 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Success": true,
"ErrorCode": "9990030003",
"ErrorMessage": "",
"HttpStatusCode": 200,
"Data": "{ \"HttpStatusCode\": 200, \"Success\": true }",
"RequestId": "10000001"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | BADPARAMETERS | Parameters are missing or in the wrong format. |
For a list of error codes, visit the Service error codes.