Queries the details of a user of the specified bastion host.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:GetUser |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the bastion host on which you want to query the user. Note
You can call the DescribeInstances operation to query the ID of the bastion host. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
The region ID of the bastion host on which you want to query the user. Note
For more information about the mapping between region IDs and region names, see Regions and zones. |
cn-hangzhou |
| UserId |
string |
Yes |
The ID of the user. Note
You can call the ListUsers operation to query the ID of the user. |
1 |
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 elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The ID of the request. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| User |
object |
The detailed information about the queried user. |
|
| DisplayName |
string |
The display name of the user. |
Bob |
| Comment |
string |
The description of the user. |
commet |
|
string |
The email address of the user. |
1099**@qq.com |
|
| Mobile |
string |
The mobile phone number of the user. |
1359999**** |
| MobileCountryCode |
string |
The location in which the mobile number of the user is registered. Valid values:
|
CN |
| UserId |
string |
The ID of the user. |
1 |
| Source |
string |
The source of the user. Valid values:
|
Local |
| UserName |
string |
The logon name of the user. |
abcabc_def |
| SourceUserId |
string |
The unique ID of the user. Note
This parameter uniquely identifies a RAM user of the bastion host. 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. |
122748924538**** |
| UserState |
array |
An array that consists of the details of the user status. |
|
|
string |
The status of the user. Valid values:
|
["Normal"] |
|
| EffectiveStartTime |
integer |
The beginning of the validity period of the user. The value is a UNIX timestamp. Unit: seconds. |
1669630029 |
| EffectiveEndTime |
integer |
The end of the validity period of the user. The value is a UNIX timestamp. Unit: seconds. |
1672502400 |
| NeedResetPassword |
boolean |
Specifies whether password reset is required upon the next logon. Valid values:
|
true |
| TwoFactorMethods |
array |
An array that consists of the details of the two-factor authentication method. |
|
|
string |
The two-factor authentication method. You can select only one method. Valid values:
|
[ "sms" ] |
|
| TwoFactorStatus |
string |
The two-factor authentication status of the user. Valid values:
|
Enable |
| LanguageStatus |
string |
Indicates whether notifications are sent in the language specified in the global settings or a custom language.
|
Custom |
| Language |
string |
This parameter is required if LanguageStatus is set to Custom.
|
en |
Examples
Success response
JSON format
{
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"User": {
"DisplayName": "Bob",
"Comment": "commet",
"Email": "1099**@qq.com",
"Mobile": "1359999****",
"MobileCountryCode": "CN",
"UserId": "1",
"Source": "Local",
"UserName": "abcabc_def",
"SourceUserId": "122748924538****",
"UserState": [
"[\"Normal\"]"
],
"EffectiveStartTime": 1669630029,
"EffectiveEndTime": 1672502400,
"NeedResetPassword": true,
"TwoFactorMethods": [
"[\n \"sms\"\n]"
],
"TwoFactorStatus": "Enable",
"LanguageStatus": "Custom",
"Language": "en"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | The argument is invalid. |
| 500 | InternalError | An unknown error occurred. | An unknown error occurred. |
| 404 | UserNotFound | The user is not found. | The user is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.