ListUsersForGroup

Last Updated: Nov 10, 2017

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

Return parameters

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

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": "zhangqiang",
  15. "JoinDate" : "2015-02-18T17:22:08Z"
  16. }
  17. ]
  18. }
  19. }
Thank you! We've received your feedback.