調用DsgUserGroupQueryUserList介面,查詢當前租戶下的使用者或角色列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
請求參數
|
名稱 |
類型 |
是否必選 |
樣本值 |
描述 |
| Action | String | 是 | DsgUserGroupQueryUserList | 系統規定參數。取值:DsgUserGroupQueryUserList。 |
返回資料
名稱 |
類型 |
樣本值 |
描述 |
| Success | Boolean | true | 調用是否成功。取值如下:
|
| ErrorCode | String | 1029030003 | 錯誤碼。 |
| ErrorMessage | String | param error | 錯誤資訊。 |
| HttpStatusCode | Integer | 400 | HTTP狀態代碼。 |
| Data | Array of Datas | 返回資料。 |
|
| AccountName | String | user1 | 使用者名稱稱。 |
| YunAccount | String | user:user1 | 阿里雲使用者名稱稱或RAM角色名稱。基於阿里雲帳號或RAM角色建立使用者組時需使用該參數的傳回值。 |
| AccountType | Integer | 2 | 使用者類型。取值如下:
|
| BaseId | String | 234 | 使用者ID或角色ID。 |
| ParentAccountId | String | 123 | 父使用者ID。RAM使用者會涉及該參數。 |
| RequestId | String | 102400001 | 請求的ID。用於定位日誌,排查問題。 |
樣本
請求樣本
http(s)://[Endpoint]/?Action=DsgUserGroupQueryUserList
&公用請求參數
正常返回樣本
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DsgUserGroupQueryUserListResponse>
<Success>true</Success>
<ErrorCode>1029030003</ErrorCode>
<ErrorMessage>param error</ErrorMessage>
<HttpStatusCode>400</HttpStatusCode>
<Data>
<AccountName>user1</AccountName>
<YunAccount>user:user1</YunAccount>
<AccountType>2</AccountType>
<BaseId>234</BaseId>
<ParentAccountId>123</ParentAccountId>
</Data>
<RequestId>102400001</RequestId>
</DsgUserGroupQueryUserListResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"ErrorCode" : "1029030003",
"ErrorMessage" : "param error",
"HttpStatusCode" : 400,
"Data" : [ {
"AccountName" : "user1",
"YunAccount" : "user:user1",
"AccountType" : 2,
"BaseId" : "234",
"ParentAccountId" : "123"
} ],
"RequestId" : "102400001"
}
錯誤碼
|
HttpCode |
錯誤碼 |
錯誤資訊 |
描述 |
| 400 | USERGROUP.ACCOUNTLISTSIZE.ERROR | The number of account exceeds the limit. | 使用者數量超限。 |
| 400 | USERGROUP.ID.ERROR | The user group ID does not match the tenant or does not exist. | 使用者組ID不存在或不屬於該租戶。 |
| 400 | USERGROUP.LISTSIZE.ERROR | The number of user groups exceeds the limit. | 使用者組數量超限。 |
| 400 | USERGROUP.PAGESIZE.ERROR | Page size is too large, maximum of 100. | 頁大小超限,最大為100。 |
| 400 | USERACCOUNT.OWNER.ERROR | User list or owner user does not exist. | 使用者列表或負責人使用者不存在。 |
| 400 | PARAMS.ERROR | param error. | 參數錯誤。 |
| 403 | PERMISSION.DENIED.ERROR | Permission denied | 許可權不足。 |
| 500 | UNKNOWN.ERROR | unknown error. | 未知錯誤。 |
訪問錯誤中心查看更多錯誤碼。