edit-icon download-icon

ListGroups

Last Updated: Aug 26, 2016

Interface description

 Lists all user groups.

Request parameters

Action

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

Marker

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

MaxItems

  • Name: MaxIer
  • Type: Integer
  • Required: No
  • Value range: [1 - 1000]
  • Default value: “100”
  • Description: Quantity of return result items. If a return result is intercepted when it reaches the “MaxItems” restriction, the value of the return parameter IsTruncated will be true.

Return parameters

Groups

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

IsTruncated

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

Marker

  • 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 following the intercepted part in the return result.

Required permissions

Action

ram:ListGroups

Resource

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

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=ListGroups
  2. &<Public request parameters>

Return example

XML format

  1. <ListGroupsResponse>
  2. <RequestId>065527AA-2F2E-AD7C-7484-F2626CFE4934</RequestId>
  3. <IsTruncated>true</IsTruncated>
  4. <Marker>EXAMPLE</Marker>
  5. <Groups>
  6. <Group>
  7. <GroupName>Dev-Team</GroupName>
  8. <Comments>Development team</Comments>
  9. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  10. <UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
  11. </Group>
  12. <Group>
  13. <GroupName>QA-Team</GroupName>
  14. <Comments>Test team</Comments>
  15. <CreateDate>2015-02-18T17:22:08Z</CreateDate>
  16. <UpdateDate>2015-02-18T17:22:08Z</UpdateDate>
  17. </Group>
  18. </Groups>
  19. </ListGroupsResponse>

JSON format

  1. {
  2. "RequestId": "065527AA-2F2E-AD7C-7484-F2626CFE4934",
  3. "IsTruncated": true,
  4. "Marker": "EXAMPLE",
  5. "Groups": {
  6. "Group": [
  7. {
  8. "GroupName": "Dev-Team",
  9. "Comments": "Development team",
  10. "CreateDate" : "2015-01-23T12:33:18Z",
  11. "UpdateDate" : "2015-01-23T12:33:18Z"
  12. },
  13. {
  14. "GroupName": "QA-Team",
  15. "Comments": "Test team",
  16. "CreateDate" : "2015-02-18T17:22:08Z",
  17. "UpdateDate" : "2015-02-18T17:22:08Z"
  18. }
  19. ]
  20. }
  21. }
Thank you! We've received your feedback.