Queries the masking rules that are applied for a PolarDB cluster or the details of a specified masking rule.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 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.

Data object

The returned result set.

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 RuleConfig parameter that is set in the ModifyMaskingRules operation.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

    <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>

JSON format

HTTP/1.1 200 OK

  "Message" : "Successful",
  "RequestId" : "2F83D131-1C18-4599-889D-729A9D******",
  "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\"}}" ]
  "Success" : true

Error codes

For a list of error codes, visit the API Error Center.