Queries the users in a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListUsers |
The operation that you want to perform. Set the value to ListUsers. |
ClusterId | String | Yes | ehpc-hz-FYUr32**** |
The ID of the cluster. You can call the ListClusters operation to query the cluster ID. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1 |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 50. Default value: 10 |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 1 |
The number of entries returned per page. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE7**** |
The ID of the request. |
PageNumber | Integer | 1 |
The number of the returned page. |
TotalCount | Integer | 1 |
The total number of returned entries. |
Users | Array of UserInfo |
The list of users. |
|
UserInfo | |||
Name | String | user1 |
The username. |
AddTime | String | 2018-07-18T17:46:47 |
The time when the user was created. |
Group | String | wheel |
The name of the permission group. Valid values:
|
Examples
Sample requests
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListUsers
&ClusterId=ehpc-hz-FYUr32****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListUsersResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE7****</RequestId>
<TotalCount>1</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>1</PageSize>
<Users>
<UserInfo>
<Name>user1</Name>
<Group>users</Group>
</UserInfo>
<UserInfo>
<Name>user2</Name>
<Group>wheel</Group>
</UserInfo>
</Users>
</ListUsersResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE7****",
"TotalCount" : 1,
"PageNumber" : 1,
"PageSize" : 1,
"Users" : {
"UserInfo" : [ {
"Name" : "user1",
"Group" : "users"
}, {
"Name" : "user2",
"Group" : "wheel"
} ]
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The error message returned because the following parameter is invalid: %s. |
403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The error message returned because the operation is not supported while the cluster is in the current state. |
404 | ManagerNotFound | The manager nodes do not exist or their status is abnormal. | The error message returned because the management node does not exist or is not running as expected. |
404 | ClusterNotFound | The specified cluster does not exist. | The error message returned because the specified cluster does not exist. |
406 | AgentError | The agent service request failed. | The error message returned because the proxy request has failed. |
406 | AgentError.Account.DomainNotExist | The specified domain does not exist: %s. | The error message returned because the following domains do not exist: {}. |
406 | AgentError.Account.GetentPasswdFailure | Failed to get the user list: %s. | The error message returned because the list of domain users has failed to be obtained. |
406 | AgentError.Account.GetUserListFailure | Get user list fail: %s | The error message returned because the list of domain users has failed to be obtained. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The error message returned because you are not authorized by RAM for this request. |
500 | UnknownError | An unknown error occurred. | The error message returned because an unknown error has occurred. Try again later. If the error persists, submit a ticket. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The service is temporarily unavailable. |
For a list of error codes, visit the API Error Center.