edit-icon download-icon

ListUsersForGroup

Last Updated: May 08, 2018

Interface description

Lists users included in a specified user group.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Operation name. Value: ListUsersForGroup

GroupName

  • Type: String
  • Required: Yes
  • Description: Group name. For example: Dev-Team

Marker

  • Name: Marker
  • Type: String
  • Required: No
  • Description: If a return result is truncated, you can use “Marker” to obtain the content after the truncated position.

MaxItems

  • Name: MaxIer
  • Type: Integer
  • Required: No
  • Value range: [1 - 1000]
  • Default value: 100
  • Description: Number of return results. If return results are truncated because of reaching the value of the “MaxItems” parameter, the value of the return parameter IsTruncated will be true.

Return parameters

Users

  • Type: User Type Array
  • Description: User information set.

IsTruncated

  • Type: Boolean
  • Description: Whether a return result is intercepted.

MarkerMarker

  • Type: String
  • Description: This parameter is available only when the value of the parameter IsTruncated is true. In this case, you need to invoke this interface and use Marker to obtain the content after the truncated position.

Required permissions

Action

ram:ListUsersForGroup

Resource

acs:ram:*:${AccountId}:group/${GroupName}

Error messages

EntityNotExist.Group
  • HTTP Status: 404
  • Error Message: The group does not exist.
InvalidParameter.GroupName.InvalidChars
  • HTTP Status: 400
  • Error Message: The parameter - “GroupName” contains invalid chars.
InvalidParameter.GroupName.Length
  • HTTP Status: 400
  • Error Message: The parameter - “GroupName” beyond the length limit.
EntityNotExist.Group
  • HTTP Status: 404
  • Error Message: The group does not exist.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=ListUsersForGroup
  2. &GroupName=dev
  3. &<Public request parameters>

Return example

XML format

  1. <ListUsersForGroupResponse>
  2. <RequestId>5756784B-79C4-E82E-24C2-FC3E171E5AB3</RequestId>
  3. <Users>
  4. <User>
  5. <UserId>1227489245380721</UserId>
  6. <UserName>zhangqiang</UserName>
  7. <DisplayName>zhangqiang</DisplayName>
  8. <JoinDate>2015-01-23T12:33:18Z</JoinDate>
  9. </User>
  10. <User>
  11. <UserId>1406498224724456</UserId>
  12. <UserName>lili</UserName>
  13. <DisplayName>lili</DisplayName>
  14. <JoinDate>2015-02-18T17:22:08Z</JoinDate>
  15. </User>
  16. </Users>
  17. </ListUsersForGroupResponse>

JSON format

  1. {
  2. "RequestId" : "4B450CA1-36E8-4AA2-8461-86B42BF4CC4E",
  3. "Users" : {
  4. "User" : [
  5. {
  6. "UserId" : "1227489245380721",
  7. "UserName" : "zhangqiang",
  8. "DisplayName": "zhangqiang",
  9. "JoinDate" : "2015-01-23T12:33:18Z"
  10. },
  11. {
  12. "UserId" : "1406498224724456",
  13. "UserName" : "lili",
  14. "DisplayName": "lili",
  15. "JoinDate" : "2015-02-18T17:22:08Z"
  16. }
  17. ]
  18. }
  19. }
Thank you! We've received your feedback.