Configures or adds masking rules.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyMaskingRules |
The operation that you want to perform. Set the value to ModifyMaskingRules. |
DBClusterId | String | Yes | pc-***************** |
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.
|
RuleName | String | No | testrule |
The name of the masking rule. You can specify only one rule name at a time. Note
|
RuleConfig | String | No | {"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"]} |
The parameter that is used to configure the masking rule that you want to modify and
the value in the JSON format. All the parameter values are of the string type. For
example,
Note
|
RuleNameList | String | No | testrule |
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
RuleName or RuleNameList .
|
Enable | String | No | true |
Enables or disables specified masking rules. Valid values:
Note This parameter takes effect only if the
RuleNameList parameter is set.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 99B355CE-526C-478B-B730-AD9D7C****** |
The ID of the request. |
Message | String | Message |
The message returned for the request. Note If the request is successful, Successful is returned. If the request fails, an exception
that contains an error code is returned.
|
Success | Boolean | true |
The result of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=ModifyMaskingRules
&DBClusterId=pc-*****************
&RuleName=testrule
&RuleConfig={"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"]}
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyMaskingRulesResponse>
<Message>Successful</Message>
<RequestId>99B355CE-526C-478B-B730-AD9D7C******</RequestId>
<Success>true</Success>
</ModifyMaskingRulesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "Successful",
"RequestId" : "99B355CE-526C-478B-B730-AD9D7C******",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.