文档

DsgWhiteListAddOrUpdate

更新时间:

调用DsgWhiteListAddOrUpdate接口,新增或编辑脱敏白名单。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称

类型

是否必选

示例值

描述

Action String DsgWhiteListAddOrUpdate

系统规定参数。取值:DsgWhiteListAddOrUpdate

WhiteLists Array

白名单集合。

RuleId Integer 123

脱敏规则ID。您可调用DsgDesensPlanQueryList接口获取。

Id Integer 123

脱敏白名单ID。

  • 不配置该参数:表示当前操作为新增脱敏白名单。
  • 配置该参数:表示编辑指定脱敏白名单信息。您可调用DsgWhiteListQueryList接口查询白名单ID。
StartTime String 2024-04-10 00:00:00

脱敏白名单的生效时间。

EndTime String null

脱敏白名单的失效时间。输入null表示白名单永久生效。

UserGroupIds Array of Integer 123

用户组ID。您可调用DsgUserGroupQueryList接口获取。

返回数据

名称

类型

示例值

描述

Success Boolean true

调用是否成功。取值如下:

  • true:调用成功。
  • false:调用失败。
ErrorCode String 1029030003

错误码。

ErrorMessage String param error

错误信息。

HttpStatusCode Integer 400

HTTP状态码。

Data Boolean true

操作结果。取值如下:

  • true:操作成功。
  • false:操作失败。
RequestId String 102400001

请求的ID。用于定位日志,排查问题。

示例

请求示例

http(s)://[Endpoint]/?Action=DsgWhiteListAddOrUpdate
&WhiteLists=[{"RuleId":123,"id":123,"StartTime":"2024-04-10 00:00:00","EndTime":"null","UserGroupIds":[123]}]
&公共请求参数

正常返回示例

XML格式

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

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

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

错误码

HttpCode

错误码

错误信息

描述

400 WHITELIST.DESENSID.ERROR The desensitization rule ID does not match or does not exist with the tenant. 场景ID不存在或不属于该租户。
400 WHITELIST.ENDTIME.ERROR end time cannot be earlier than start time. 结束时间不能早于开始时间。
400 WHITELIST.ID.ERROR The whitelist ID does not match or does not exist with the tenant. 白名单ID不存在或不属于该租户。
400 WHITELIST.MCPROJECT.ERROR The projectName on the bottom layer desensitization whitelist of MC cannot be empty. ProjectName在创建MaxCompute脱敏白名单时不能为空。
400 WHITELIST.PAGESIZE.ERROR Page size is too large, maximum of 100. 页大小超限,不能超过100。
400 WHITELIST.SIZE.ERROR The number of white list exceeds the limit. 白名单数量超限。
400 WHITELIST.STARTTIME.ERROR 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. 时间参数格式化错误,需使用yyyy MM dd HH: mm: ss。
400 WHITELIST.USERGROUP.ERROR The user group ID does not match or does not exist with the tenant. 用户组ID不存在或不属于该租户。
400 WHITELIST.USERGROUPEMPTY.ERROR User group ID cannot be empty. 用户组ID不能为空。
400 WHITELIST.USERGROUPLISTSIZE.ERROR The number of user group exceeds the limit. 用户组数量超限。
400 PARAMS.ERROR param error. 参数错误。
403 PERMISSION.DENIED.ERROR Permission denied 权限不足。
500 UNKNOWN.ERROR unknown error. 未知错误。

访问错误中心查看更多错误码。

  • 本页导读 (1)