Edits a sensitive field that is defined based on the category and sensitivity level of data in Data Security Guard.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | EditRecognizeRule | The operation that you want to perform. Set the value to EditRecognizeRule. |
TenantId | String | No | 10241024 | 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. |
AccountName | String | No | dsg-uat | The Alibaba Cloud account that is used to create the sensitive data identification rule. Enter the username of the Alibaba Cloud account. |
SensitiveId | String | No | 1a928de7-3962-4e07-93ac-e1973baa1024 | The ID of the sensitive field. You can call the QuerySensNodeInfo operation to query the IDs of all sensitive fields. You can also call the QueryRecognizeRuleDetail operation to query the IDs of specific sensitive fields. |
SensitiveName | String | No | Name | The name of the custom sensitive field. Enter a string that is less than 128 characters in length. |
NodeId | String | No | 0ce67949-0810-400f-a24a-cc5ffafe1024 | 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. |
NodeParent | String | No | Customer/Individual/Personal Natural Information/Personal Profile | 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. |
TemplateId | String | No | e1970541-6cf5-4d23-b101-d5b66f6e1024 | The template ID. You can call the QueryDefaultTemplate operation to obtain the template ID. |
level | String | No | 1 | 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. |
LevelName | String | No | Confidential | 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 | This is a sensitive field that identifies names. | The description of the sensitive field. Enter a string that is less than 128 characters in length. |
Status | Integer | No | 0 | The status of the sensitive field. Valid values:
|
OperationType | Integer | No | 0 | The type of the arithmetic operation. Valid values:
|
RecognizeRulesType | String | No | 1 | The type of the sensitive data identification rule. Valid values:
|
RecognizeRules | String | No | {"contentRule":{"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.GenderCond"},"_clazz":"com.alipay.dsg.dal.model.RuleContent"} | 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. |
ContentScan | String | No | {"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.NationalityCond"} | Identifies content. You can call the QuerySensNodeInfo operation to query the value of the current parameter for a built-in sensitive field. |
ColScan | String | No | default.qujian.* | Scans fields. The system identifies only fields that are assigned with values.
|
ColExclude | String | No | default.qujian.*6 | Excludes fields. The system does not identify fields that are assigned with values.
|
CommentScan | String | No | test | Scans content. The value is the text of each field comment in your data asset. Fuzzy match is supported. |
HitThreshold | Integer | No | 50 | 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. |
Response parameters
Parameter | Type | Example | Description |
Success | Boolean | true | Indicates whether the request was successful.
|
ErrorCode | String | 9990030003 | The error code. |
ErrorMessage | String | A required parameter is not specified. | The error message. |
HttpStatusCode | Integer | 200 | The HTTP status code. |
Data | Any | { "HttpStatusCode": 200, "Success": true } | The returned result in the JSON format. |
RequestId | String | 10000001 | The request ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=EditRecognizeRule
&TenantId=10241024
&AccountName=dsg-uat
&SensitiveId=1a928de7-3962-4e07-93ac-e1973baa1024
&SensitiveName=Name
&NodeId=0ce67949-0810-400f-a24a-cc5ffafe1024
&NodeParent=Customer/Individual/Personal Natural Information/Personal Profile
&TemplateId=e1970541-6cf5-4d23-b101-d5b66f6e1024
&level=1
&LevelName=Confidential
&SensitiveDescription=A sensitive field that identifies names
&Status=0
&OperationType=0
&RecognizeRulesType=1
&RecognizeRules={"contentRule":{"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.GenderCond"},"_clazz":"com.alipay.dsg.dal.model.RuleContent"}
&ContentScan={"_clazz":"com.alipay.dsgclient.sdk.dsg.fastscan.engine.cond.NationalityCond"}
&ColScan=default.qujian.*
&ColExclude=default.qujian.*6
&CommentScan=test
&HitThreshold=50
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<EditRecognizeRuleResponse>
<Success>true</Success>
<ErrorCode>9990030003</ErrorCode>
<ErrorMessage>A required parameter is not specified.</ErrorMessage>
<HttpStatusCode>200</HttpStatusCode>
<Data>{ "HttpStatusCode": 200, "Success": true }</Data>
<RequestId>10000001</RequestId>
</EditRecognizeRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"ErrorCode" : "9990030003",
"ErrorMessage": "A required parameter is not specified.",
"HttpStatusCode" : 200,
"Data" : "{ \"HttpStatusCode\": 200, \"Success\": true }",
"RequestId" : "10000001"
}
Error codes
HttpCode | Error code | Error message | Description |
400 | BADPARAMETERS | Parameters are missing or in the wrong format. | A required parameter is not specified. |
For a list of error codes, see Service error codes.