All Products
Search
Document Center

:DsgWhiteListAddOrUpdate

更新時間:Jun 11, 2024

Adds or modifies a data masking whitelist.

Debugging

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

DsgWhiteListAddOrUpdate

The operation that you want to perform. Set the value to DsgWhiteListAddOrUpdate.

WhiteLists

Array

Yes

A collection of whitelists.

RuleId

Integer

Yes

123

The ID of the data masking rule. You can call the DsgDesensPlanQueryList operation to query the ID of the data masking rule.

Id

Integer

No

123

The ID of the data masking whitelist.

  • If you do not configure this parameter, the current operation is to add a data masking whitelist.

  • If you configure this parameter, the current operation is to modify a data masking whitelist. You can call the DsgWhiteListQueryList operation to query the whitelist ID.

StartTime

String

Yes

2024-04-10 00:00:00

The time when the data masking whitelist takes effect.

EndTime

String

No

null

The time when the data masking whitelist expires. If you enter null, the whitelist is valid permanently.

UserGroupIds

Array of Integer

Yes

123

The user group ID. You can call the DsgUserGroupQueryList operation to query the user group ID.

Response parameters

Parameter

Type

Example

Description

Success

Boolean

true

Indicates whether the request was successful. Valid values:

  • true

  • false

ErrorCode

String

1029030003

The error code.

ErrorMessage

String

param error

The error message.

HttpStatusCode

Integer

400

The HTTP status code.

Data

Boolean

true

The operation result. Valid values:

  • true: The operation is successful.

  • false: The operation failed.

RequestId

String

102400001

The request ID. You can use the ID to locate logs and troubleshoot issues.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DsgWhiteListAddOrUpdate
&WhiteLists=[{"RuleId":123,"id":123,"StartTime":"2024-04-10 00:00:00","EndTime":"null","UserGroupIds":[123]}]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DsgWhiteListAddOrUpdateResponse>
    <Success>true</Success>
    <ErrorCode>1029030003</ErrorCode>
    <ErrorMessage>param error</ErrorMessage>
    <HttpStatusCode>400</HttpStatusCode>
    <Data>true</Data>
    <RequestId>102400001</RequestId>
</DsgWhiteListAddOrUpdateResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Success" : true,
  "ErrorCode" : "1029030003",
  "ErrorMessage" : "param error",
  "HttpStatusCode" : 400,
  "Data" : true,
  "RequestId" : "102400001"
}

Error codes

HttpCode

Error code

Error message

Description

400

WHITELIST.DESENSID.ERROR

The desensitization rule ID does not match or does not exist with the tenant.

The scenario ID does not exist or does not belong to the tenant.

400

WHITELIST.ENDTIME.ERROR

end time cannot be earlier than start time.

The end time cannot be earlier than the start time.

400

WHITELIST.ID.ERROR

The whitelist ID does not match or does not exist with the tenant.

The whitelist ID does not exist or does not belong to the tenant.

400

WHITELIST.MCPROJECT.ERROR

The projectName on the bottom layer desensitization whitelist of MC cannot be empty.

The ProjectName parameter must specified when you create a data masking whitelist for a MaxCompute project.

400

WHITELIST.PAGESIZE.ERROR

Page size is too large, maximum of 100.

The number of entries per page exceeds the upper limit. The maximum number of entries per page is 100.

400

WHITELIST.SIZE.ERROR

The number of white list exceeds the limit.

The number of whitelists exceeds the upper limit.

400

WHITELIST.STARTTIME.ERROR

start time cannot be earlier than today.

The start time cannot be earlier than today.

400

WHITELIST.TIMEFORMAT.ERROR

The time format is incorrect, please use yyyy MM dd HH: mm: ss format.

The time parameter is incorrectly formatted. The time should be in the yyyy MM dd HH: mm: ss format.

400

WHITELIST.USERGROUP.ERROR

The user group ID does not match or does not exist with the tenant.

The user group ID does not exist or does not belong to the tenant.

400

WHITELIST.USERGROUPEMPTY.ERROR

User group ID cannot be empty.

The user group ID must be specified.

400

WHITELIST.USERGROUPLISTSIZE.ERROR

The number of user group exceeds the limit.

The number of user groups exceeds the upper limit.

400

PARAMS.ERROR

param error.

The values specified for one or more parameters are invalid.

403

PERMISSION.DENIED.ERROR

Permission denied

You are not authorized to perform this operation.

500

UNKNOWN.ERROR

unknown error.

An unknown error has occurred.

For a list of error codes, see Service error codes.