Queries the details of all RAM users.

Description

You can call the following API operations to query the information about all RAM users:

  • ListUsers: queries the details of all RAM users.
  • ListUserBasicInfos: queries the basic information about all RAM users. The basic information includes only the logon names (UserPrincipalName), display names (DisplayName), and user IDs (UserId).

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 ListUsers

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

Marker String No EXAMPLE

The marker. If part of a previous response is truncated, you can use this parameter to obtain the truncated part.

MaxItems Integer No 1000

The number of entries to return. If a response is truncated because it reaches the value of MaxItems, the value of IsTruncated will be true.

Valid values: 1 to 1000. Default value: 1000.

Response parameters

Parameter Type Example Description
RequestId String 4B450CA1-36E8-4AA2-8461-86B42BF4CC4E

The ID of the request.

IsTruncated Boolean true

Indicates whether the response is truncated. Valid values:

  • true
  • false
Marker String EXAMPLE

The parameter that is used to obtain the truncated part. It takes effect only when IsTruncated is set to true.

Users Array of User

An array that consists of the information about the RAM user.

User
DisplayName String test

The display name of the RAM user.

UserPrincipalName String test@example.onaliyun.com

The logon name of the RAM user.

Email String alice@example.com

The email address of the RAM user.

Note This parameter is valid only on the China site (aliyun.com).
UpdateDate String 2020-10-13T09:19:49Z

The time when the information about the RAM user was updated.

MobilePhone String 86-1868888****

The mobile phone number of the RAM user.

Note This parameter is valid only on the China site (aliyun.com).
UserId String 20732900249392****

The ID of the RAM user.

Comments String This is a cloud computing engineer.

The description.

LastLoginDate String 1648624925505

The timestamp when the RAM user last logged on to the console.

CreateDate String 2020-10-12T09:12:00Z

The time when the RAM user was created.

Examples

Sample requests

https://[Endpoint]/?Action=ListUsers
&<Common request parameters>

Sample success responses

XML format

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

<ListUsersResponse>
    <RequestId>4B450CA1-36E8-4AA2-8461-86B42BF4CC4E</RequestId>
    <IsTruncated>true</IsTruncated>
    <Marker>EXAMPLE</Marker>
    <Users>
        <User>
            <UpdateDate>2020-10-13T09:19:49Z</UpdateDate>
            <Email>alice@example.com</Email>
            <UserId>20732900249392****</UserId>
            <Comments>This is a cloud computing engineer.</Comments>
            <DisplayName>test</DisplayName>
            <LastLoginDate>1648624925505</LastLoginDate>
            <UserPrincipalName>test@example.onaliyun.com</UserPrincipalName>
            <CreateDate>2020-10-12T09:12:00Z</CreateDate>
            <MobilePhone>86-1868888****</MobilePhone>
        </User>
    </Users>
</ListUsersResponse>

JSON format

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

{
  "RequestId" : "4B450CA1-36E8-4AA2-8461-86B42BF4CC4E",
  "IsTruncated" : true,
  "Marker" : "EXAMPLE",
  "Users" : {
    "User" : [ {
      "UpdateDate" : "2020-10-13T09:19:49Z",
      "Email" : "alice@example.com",
      "UserId" : "20732900249392****",
      "Comments" : "This is a cloud computing engineer.",
      "DisplayName" : "test",
      "LastLoginDate" : "1648624925505",
      "UserPrincipalName" : "test@example.onaliyun.com",
      "CreateDate" : "2020-10-12T09:12:00Z",
      "MobilePhone" : "86-1868888****"
    } ]
  }
}

Error codes

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