Queries the basic information about all RAM users.

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 ListUserBasicInfos

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

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 100

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: 100.

Tag.N.Key String No operator

The key of tag N.

Valid values of N: 1 to 20. N must be consecutive.

Tag.N.Value String No alice

The value of tag N.

Valid values of N: 1 to 20. N must be consecutive.

Response parameters

Parameter Type Example Description
RequestId String EF2B25FD-CADE-445B-BE4D-E082E0FF1A0F

The ID of the request.

IsTruncated Boolean true

Indicates whether the response is truncated. Valid values:

  • true
  • false
UserBasicInfos Array of UserBasicInfo

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

UserBasicInfo
UserPrincipalName String test@example.onaliyun.com

The logon name of the RAM user.

DisplayName String test

The display name of the RAM user.

UserId String 20732900249392****

The ID of the RAM user.

Tags Array of Tag

An array that consists of tags.

Tag
TagKey String operator

The tag key.

TagValue String alice

The tag value.

Marker String EXAMPLE

The marker. This parameter is returned only if the value of IsTruncated is true. If the parameter is returned, you can call this operation again and set this parameter to obtain the truncated part.

Examples

Sample requests

https://[Endpoint]/?Action=ListUserBasicInfos
&Marker=EXAMPLE
&MaxItems=100
&Tag.1.Key=operator
&Tag.1.Value=alice
&<Common request parameters>

Sample success responses

XML format

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

<ListUserBasicInfosResponse>
    <RequestId>EF2B25FD-CADE-445B-BE4D-E082E0FF1A0F</RequestId>
    <IsTruncated>true</IsTruncated>
    <UserBasicInfos>
        <UserPrincipalName>test@example.onaliyun.com</UserPrincipalName>
        <DisplayName>test</DisplayName>
        <UserId>20732900249392****</UserId>
        <Tags>
            <TagKey>operator</TagKey>
            <TagValue>alice</TagValue>
        </Tags>
    </UserBasicInfos>
    <Marker>EXAMPLE</Marker>
</ListUserBasicInfosResponse>

JSON format

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

{
  "RequestId" : "EF2B25FD-CADE-445B-BE4D-E082E0FF1A0F",
  "IsTruncated" : true,
  "UserBasicInfos" : [ {
    "UserPrincipalName" : "test@example.onaliyun.com",
    "DisplayName" : "test",
    "UserId" : "20732900249392****",
    "Tags" : [ {
      "TagKey" : "operator",
      "TagValue" : "alice"
    } ]
  } ],
  "Marker" : "EXAMPLE"
}

Error codes

For a list of error codes, see Service error codes.