Queries the masking rules that are applied for a PolarDB cluster or the details of a specified masking rule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DescribeMaskingRules | The operation that you want to perform. Set the value to DescribeMaskingRules. |
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. |
RuleNameList | String | No | testrule | The name of the masking rule. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 2F83D131-1C18-4599-889D-729A9D****** | The ID of the request. |
Message | String | Successful | The message that is returned for the request. Note If the request is successful, Successful is returned. If the request fails, an error message that contains information such as an error code is returned. |
Success | Boolean | true | The result of the request. Valid values:
|
Data | Object | The result data that is returned. | |
RuleList | Array of String | "{\"testrule\":{\"auto\":{\"databases\":[],\"tables\":[\"t1\"],\"columns\":[\"c1\"]},\"applies_to\":[],\"description\":\"This rule will be applied to the columns c1 in table t1\",\"enabled\":\"true\"}}" | The detailed configurations of the masking rule. Note For more information, see the description of the |
DBClusterId | String | pc-bp1s826a1up****** | The ID of the cluster. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=DescribeMaskingRules
&DBClusterId=pc-*****************
&RuleNameList=testrule
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeMaskingRulesResponse>
<RequestId>2F83D131-1C18-4599-889D-729A9D******</RequestId>
<Message>Successful</Message>
<Success>true</Success>
<Data>
<RuleList>"{\"testrule\":{\"auto\":{\"databases\":[],\"tables\":[\"t1\"],\"columns\":[\"c1\"]},\"applies_to\":[],\"description\":\"This rule will be applied to the columns c1 in table t1\",\"enabled\":\"true\"}}"</RuleList>
</Data>
<DBClusterId>pc-bp1s826a1up******</DBClusterId>
</DescribeMaskingRulesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "2F83D131-1C18-4599-889D-729A9D******",
"Message" : "Successful",
"Success" : true,
"Data" : {
"RuleList" : [ "\"{\\\"testrule\\\":{\\\"auto\\\":{\\\"databases\\\":[],\\\"tables\\\":[\\\"t1\\\"],\\\"columns\\\":[\\\"c1\\\"]},\\\"applies_to\\\":[],\\\"description\\\":\\\"This rule will be applied to the columns c1 in table t1\\\",\\\"enabled\\\":\\\"true\\\"}}\"" ]
},
"DBClusterId" : "pc-bp1s826a1up******"
}
Error codes
HTTP status code | Error code | Error message | Description |
400 | Abs.InvalidAccount.NotFound | account is not found. | The error message returned because the account does not exist. |
404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified DBClusterId does not exist in the current record. |
For a list of error codes, visit the API Error Center.