調用DsgWhiteListAddOrUpdate介面,新增或編輯脫敏白名單。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
請求參數
|
名稱 |
類型 |
是否必選 |
樣本值 |
描述 |
| Action | String | 是 | DsgWhiteListAddOrUpdate | 系統規定參數。取值:DsgWhiteListAddOrUpdate。 |
| WhiteLists | Array | 是 | 白名單集合。 |
|
| RuleId | Integer | 是 | 123 | 脫敏規則ID。您可調用DsgDesensPlanQueryList介面擷取。 |
| Id | Integer | 否 | 123 | 脫敏白名單ID。
|
| StartTime | String | 是 | 2024-04-10 00:00:00 | 脫敏白名單的生效時間。 |
| EndTime | String | 否 | null | 脫敏白名單的失效時間。輸入null表示白名單永久生效。 |
| UserGroupIds | Array of Integer | 是 | 123 | 使用者組ID。您可調用DsgUserGroupQueryList介面擷取。 |
返回資料
名稱 |
類型 |
樣本值 |
描述 |
| Success | Boolean | true | 調用是否成功。取值如下:
|
| ErrorCode | String | 1029030003 | 錯誤碼。 |
| ErrorMessage | String | param error | 錯誤資訊。 |
| HttpStatusCode | Integer | 400 | HTTP狀態代碼。 |
| Data | Boolean | true | 操作結果。取值如下:
|
| 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. | 未知錯誤。 |
訪問錯誤中心查看更多錯誤碼。