Queries the information about a RAM user.

This topic provides an example on how to query the information about the RAM user alice.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetUser

The operation that you want to perform. Set the value to GetUser.

UserName String Yes alice

The username of the RAM user.

The username must be 1 to 64 characters in length, and can contain letters, digits, periods (.), hyphens (-), and underscores (_).

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
User Object

The information about the RAM user.

DisplayName String alice

The display name of the RAM user.

Email String alice@example.com

The email address of the RAM user.

Note This parameter can be returned only on the China site (aliyun.com).
UpdateDate String 2015-02-11T03:15:21Z

The point in time when the information about the RAM user was last modified. The time is displayed in UTC.

MobilePhone String 86-1860000****

The mobile phone number of the RAM user.

Note This parameter can be returned only on the China site (aliyun.com).
UserId String 222748924538****

The ID of the RAM user.

Comments String This is a cloud computing engineer.

The description of the RAM user.

LastLoginDate String 2015-01-23T12:33:18Z

The point in time when the RAM user last logged on to the Alibaba Cloud Management Console by using the password. The time is displayed in UTC.

CreateDate String 2015-01-23T12:33:18Z

The point in time when the RAM user was created. The time is displayed in UTC.

UserName String alice

The username of the RAM user.

RequestId String 2D69A58F-345C-4FDE-88E4-BF5189484043

The ID of the request.

Examples

Sample requests

https://ram.aliyuncs.com/?Action=GetUser
&UserName=alice
&<Common Request Parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetUserResponse>
    <RequestId>2D69A58F-345C-4FDE-88E4-BF5189484043</RequestId>
    <User>
        <UserId>222748924538****</UserId>
        <UserName>alice</UserName>
        <DisplayName>alice</DisplayName>
        <MobilePhone>86-1860000****</MobilePhone>
        <Email>alice@example.com</Email>
        <Comments>This is a cloud computing engineer.</Comments>
        <CreateDate>2015-01-23T12:33:18Z</CreateDate>
        <UpdateDate>2015-02-11T03:15:21Z</UpdateDate>
        <LastLoginDate>2015-01-23T12:33:18Z</LastLoginDate>
    </User>
</GetUserResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "2D69A58F-345C-4FDE-88E4-BF5189484043",
  "User" : {
    "UserId" : "222748924538****",
    "UserName" : "alice",
    "DisplayName" : "alice",
    "MobilePhone" : "86-1860000****",
    "Email" : "alice@example.com",
    "Comments" : "This is a cloud computing engineer.",
    "CreateDate" : "2015-01-23T12:33:18Z",
    "UpdateDate" : "2015-02-11T03:15:21Z",
    "LastLoginDate" : "2015-01-23T12:33:18Z"
  }
}

Error codes

For a list of error codes, visit the API Error Center.