Adds or modifies a user group in Data Security Guard.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DsgUserGroupAddOrUpdate | The operation that you want to perform. Set the value to DsgUserGroupAddOrUpdate. |
UserGroups | Array | Yes | The information about the user group. | |
Id | Long | No | 123 | The user group ID.
|
Name | String | Yes | yun_group | The name of the user group. |
Owner | String | Yes | user1 | The owner of the user group. |
Accounts | Array of String | Yes | user1 | The username or MaxCompute role. This parameter must be configured based on the value of the UserGroupType parameter. |
ProjectName | String | No | dev_project | The name of the MaxCompute project. You must configure this parameter when you create a MaxCompute user group. |
UserGroupType | Integer | Yes | 1 | The type of the user group. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
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:
|
RequestId | String | 102400001 | The request ID. You can use the ID to locate logs and troubleshoot issues. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DsgUserGroupAddOrUpdate
&UserGroups=[{"Id":123,"Name":"yun_group","Owner":"user1","Accounts":["user1"],"ProjectName":"dev_project","UserGroupType":1}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DsgUserGroupAddOrUpdateResponse>
<Success>true</Success>
<ErrorCode>1029030003</ErrorCode>
<ErrorMessage>param error</ErrorMessage>
<HttpStatusCode>400</HttpStatusCode>
<Data>true</Data>
<RequestId>102400001</RequestId>
</DsgUserGroupAddOrUpdateResponse>
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 | USERGROUP.ACCOUNTLISTSIZE.ERROR | The number of account exceeds the limit. | The number of users exceeds the upper limit. |
400 | USERGROUP.ID.ERROR | The user group ID does not match the tenant or does not exist. | The user group ID does not exist or does not belong to the tenant. |
400 | USERGROUP.LISTSIZE.ERROR | The number of user groups exceeds the limit. | The number of user groups exceeds the upper limit. |
400 | USERGROUP.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 | USERACCOUNT.OWNER.ERROR | User list or owner user does not exist. | The user list or the owner of users does not exist. |
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.