Queries the users of a specified Bastionhost instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListUsers |
The operation that you want to perform. Set the value to ListUsers. |
InstanceId | String | Yes | bastionhost-cn-st220aw**** |
The ID of the Bastionhost instance to which the users to be queried belong. Note You can call the DescribeInstances operation to query the ID of the Bastionhost instance.
|
RegionId | String | No | cn-hangzhou |
The region ID of the Bastionhost instance to which the users to be queried belong. Note For more information about the mapping between region IDs and region names, see Regions and zones.
|
PageNumber | String | No | 1 |
The number of the page to return. Default value: 1. |
PageSize | String | No | 20 |
The number of entries to return on each page. The value of the PageSize parameter must not exceed 100. By default, the number of entries on each page is 20. If you do not set the PageSize parameter, 20 entries are returned per page by default. Note We recommend that you do not leave this parameter empty.
|
UserName | String | No | abc |
The logon name of the user to be queried. Only exact match is supported. |
DisplayName | String | No | User |
The display name of the user to be queried. Only exact match is supported. |
Source | String | No | Local |
The source of the user to be queried. Valid values:
|
Mobile | String | No | 1359999**** |
The mobile number of the user to be queried. Only exact match is supported. |
UserState | String | No | Normal |
The status of the user to be queried. Valid values:
|
SourceUserId | String | No | 122748924538**** |
The unique ID of the user to be queried. Only exact match is supported. Note This parameter uniquely identifies a RAM user of the Bastionhost instance. This parameter
takes effect only when the Source parameter is set to Ram. You can call the ListUsers operation to obtain the unique ID of the user from the UserId response parameter.
|
UserGroupId | String | No | 1 |
The ID of the user group to be queried. Note You can call the ListUserGroups operation to query the ID of the user group.
|
All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.
For more information about sample requests, see the "Examples" section of this topic.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
The ID of the request. |
TotalCount | Integer | 1 |
The total number of users that were queried. |
Users | Array of Item |
The list of users that were queried. |
|
Comment | String | comment |
The description of the user. |
DisplayName | String | Bob |
The display name of the user. |
String | 1099**@qq.com |
The email address of the user. |
|
Mobile | String | 1359999**** |
The mobile number of the user. |
MobileCountryCode | String | CN |
The country where the mobile number of the user is registered. Valid values:
|
Source | String | Local |
The source of the user. Valid values:
|
SourceUserId | String | 122748924538**** |
The unique ID of the user. Note This parameter uniquely identifies a RAM user of the Bastionhost instance. A value
is returned for this parameter if the Source parameter is set to Ram. No value is returned for this parameter if the Source parameter is set to Local.
|
UserId | String | 1 |
The ID of the user. |
UserName | String | abc_def |
The logon name of the user. |
UserState | List | ["Normal"] |
The status of the user. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListUsers
&InstanceId=bastionhost-cn-st220aw****
&<Common request parameters>
Sample success responses
XML
format
<ListUsersResponse>
<TotalCount>1</TotalCount>
<RequestId>EC9BF0F4-8983-491A-BC8C-1B4DD94976DE</RequestId>
<Users>
<Comment>comment</Comment>
<UserName>abc_def</UserName>
<Email>1099**@qq.com</Email>
<UserId>1</UserId>
<SourceUserId>122748924538****</SourceUserId>
<MobileCountryCode>CN</MobileCountryCode>
<DisplayName>Bob</DisplayName>
<Mobile>1359999****</Mobile>
<Source>Local</Source>
<UserState>Normal</UserState>
</Users>
</ListUsersResponse>
JSON
format
{
"TotalCount": "1",
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"Users": [{
"Comment": "comment",
"UserName": "abc_def",
"Email": "1099**@qq.com",
"UserId": "1",
"SourceUserId": "122748924538****",
"MobileCountryCode": "CN",
"DisplayName": "Bob",
"Mobile": "1359999****",
"Source": "Local",
"UserState": ["Normal"]
}]
}
Error codes
For a list of error codes, visit the API Error Center.