Modifies or adds a data masking rule.
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 |
---|---|---|---|---|
polardb:ModifyMaskingRules | update |
|
| none |
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 |