Modifies or adds a data masking rule.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of the cluster. Note
You can call the DescribeDBClusters operation to query the details of the clusters that belong to your Alibaba Cloud account, such as cluster IDs.
| pc-***************** |
RuleName | string | No | The name of the data masking rule. You can specify only one rule name at a time. Note
RuleConfig . | testrule |
RuleConfig | string | No | The parameter that is used to specify the masking rule that you want to modify and the value in the JSON format. All parameter values are of the string type. Example:
Note
RuleName , RuleConfig parameter is required."applies_to" or "exempted" . | {"auto": {"databases": ["db1"], "tables": ["tb1"], "columns": ["c1,c2"] }, "description": "This rule will be applied to the columns c1 and c2 in table t1", "enabled": true, "applies_to": ["user"]} |
RuleNameList | string | No | The list of masking rule names. You can specify one or more masking rules at a time. Separate the masking rule names with commas (,). Note
You must specify either the RuleName or RuleNameList parameter.
| testrule |
Enable | string | No | Specifies whether to enable the specified masking rule. Valid values:
Note
This parameter is valid only when the RuleNameList parameter is specfied.
| true |
RuleVersion | string | No | The version of the masking rule. Default value: v1. Valid values:
| v2 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "99B355CE-526C-478B-B730-AD9D7C******",
"Message": "Message",
"Success": true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | The specified DBClusterId parameter is invalid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-02 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-09-12 | The Error code has changed | View Change Details |