Adds a masking rule.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | AddDesensitizationRule |
The operation that you want to perform. Set the value to AddDesensitizationRule. |
| RuleName | String | Yes | Masking algorithm test |
The name of the rule. |
| RuleType | String | Yes | HASH |
The masking algorithm. |
| RuleDescription | String | No | The hash algorithm. |
The description of the rule. |
| FunctionType | String | Yes | MD5 |
The type of the masking algorithm. |
| Tid | Long | No | 3*** |
The ID of the tenant. Note To view the ID of the tenant, go to the Data Management (DMS) console and move the
pointer over the profile picture in the upper-right corner. For more information,
see View information about the current tenant.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
The ID of the request. |
| ErrorCode | String | UnknownError |
The error code returned if the request failed. |
| ErrorMessage | String | UnknownError |
The error message returned if the request failed. |
| Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
| RuleId | Integer | 35*** |
The ID generated for the masking rule. |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=AddDesensitizationRule
&RuleName=Masking algorithm test
&RuleType=HASH
&RuleDescription=The hash algorithm.
&FunctionType=MD5
&FunctionParams=[{"key":"{paramName: salt, paramValue: 1}"}]
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddDesensitizationRuleResponse>
<RequestId>0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931</RequestId>
<ErrorCode>UnknownError</ErrorCode>
<ErrorMessage>UnknownError</ErrorMessage>
<Success>true</Success>
</AddDesensitizationRuleResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"ErrorCode" : "UnknownError",
"ErrorMessage" : "UnknownError",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.