Modifying a Combined Identification Rule
Function
This API is used to modify a combined identification rule.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/{project_id}/security/data-classification/rule/combine/{id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
|
id |
Yes |
String |
Identification rule ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
|
X-Auth-Token |
Yes |
String |
IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This parameter is mandatory for token authentication. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Rule name |
|
secrecy_level_id |
Yes |
String |
Security level ID |
|
combine_expression |
Yes |
String |
Condition expression |
|
description |
No |
String |
Rule description |
|
category_id |
No |
String |
Classification ID |
|
enable |
No |
Boolean |
Enabling status |
|
single_expressions |
Yes |
Array of DataClassificationSingleRuleDTO objects |
Single expressions |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
rule_code |
Yes |
String |
Rule No., in uppercase letters |
|
algorithm_type |
Yes |
String |
Algorithm type, which can be REGEX, REGEX_INSENSITIVE, GROOVY, LENGTH_EQ, LENGTH_GT, LENGTH_LT, or BUILTIN |
|
match_type |
Yes |
String |
Matching type, which can be CONTENT, COLUMN, COMMIT, TABLE_NAME, TABLE_COMMENT, or DATABASE_NAME |
|
expression |
Yes |
String |
expression |
|
builtin_rule_id |
No |
String |
Built-in rule ID |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
uuid |
String |
Rule ID. |
|
rule_type |
String |
Rule type. The options are CUSTOM and BUILTIN. |
|
secrecy_level |
String |
Security level name. |
|
secrecy_level_num |
Long |
Confidentiality level. |
|
name |
String |
Indicates the rule name. |
|
guid |
String |
guid. |
|
enable |
Boolean |
Indicates whether the rule is enabled. |
|
method |
String |
Rule method. The value can be REGULAR, NONE, DEFAULT, or COMBINE. |
|
content_expression |
String |
Content expression. |
|
column_expression |
String |
Column expression. |
|
commit_expression |
String |
Remarks expression. |
|
combine_expression |
String |
Condition expression |
|
project_id |
String |
Project ID. |
|
description |
String |
Specifies the assignment description. |
|
created_by |
String |
Policy creator. |
|
created_at |
Long |
Time when a policy is created. |
|
updated_by |
String |
Person who updates the policy. |
|
updated_at |
Long |
Time when a policy is updated. |
|
builtin_rule_id |
String |
ID of a built-in rule. |
|
category_id |
String |
Category ID. |
|
instance_id |
String |
Instance ID. |
|
match_type |
String |
Match type. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
/v1/0833a5737480d53b2f25c010dc1a7b88/security/data-classification/rule/{id}
{
"secrecy_level_id" : "8a9480ad7e992660017e9a381244000d",
"category_id" : "0cce38e7c28547828905ae9e4f10a4bf",
"name" : "Special_Administrative_Region_test",
"description" : "testModifyDes",
"combine_expression" : "A&&B",
"single_expressions" : [ {
"rule_code" : "A",
"algorithm_type" : "REGEX",
"match_type" : "CONTENT",
"expression" : "a*"
}, {
"rule_code" : "B",
"algorithm_type" : "LENGTH_EQ",
"match_type" : "TABLE_COMMENT",
"expression" : 11
} ]
}
Example Responses
Status code: 200
ok
{
"builtin_rule_id" : null,
"category_id" : "0cce38e7c28547828905ae9e4f10a4bf",
"column_expression" : null,
"commit_expression" : null,
"content_expression" : ".*",
"created_at" : 1698633124002,
"created_by" : "chenxiaoyu",
"description" : "",
"enable" : true,
"groups" : null,
"guid" : null,
"instance_id" : "dd97167b873d4a79b2aad54d4370a3bc",
"method" : "REGULAR",
"name" : "matchRules",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"rule_type" : "CUSTOM",
"secrecy_level" : "asd",
"secrecy_level_num" : 1,
"updated_at" : 1698633124002,
"updated_by" : "chenxiaoyu",
"uuid" : "8a94800e8b753a35018b7e6be6950023"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
ok |
|
400 |
Bad Request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.