ListRoles

Last Updated: Jun 05, 2017

Interface description

 Lists roles.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Operation interface,required. The parameter value is “ListRoles”.

Return parameters

Roles

  • Type: Role Type Array
  • Description: Role name list.

Required permissions

Action

ram:ListRoles

Resource

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

Operation examples

Request example

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

Return example

XML format

  1. <ListRolesResponse>
  2. <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
  3. <Roles>
  4. <Role>
  5. <RoleId>901234567890123</RoleId>
  6. <RoleName>ECSAdmin</RoleName>
  7. <Arn>acs:ram::1234567890123456:role/ECSAdmin</Arn>
  8. <Description>ECS Administrator role</Description>
  9. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  10. <UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
  11. </Role>
  12. <Role>
  13. <RoleId>901234567890456</RoleId>
  14. <RoleName>OSSReadonlyAccess</RoleName>
  15. <Arn>acs:ram::1234567890123456:role/OSSReadonlyAccess</Arn>
  16. <Description>OSS read-only access role</Description>
  17. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  18. <UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
  19. </Role>
  20. </Roles>
  21. </ListRolesResponse>

JSON format

  1. {
  2. "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  3. "Roles": {
  4. "Role": [
  5. {
  6. "RoleId": "901234567890123",
  7. "RoleName": "ECSAdmin",
  8. "Arn": "acs:ram::1234567890123456:role/ECSAdmin",
  9. "Description": "ECS Administrator role",
  10. "CreateDate": "2015-01-23T12:33:18Z",
  11. "UpdateDate": "2015-01-23T12:33:18Z"
  12. },
  13. {
  14. "RoleId": "901234567890456",
  15. "RoleName": "OSSReadonlyAccess",
  16. "Arn": "acs:ram::1234567890123456:role/OSSReadonlyAccess",
  17. "Description": "OSS administrator read-only permission",
  18. "CreateDate": "2015-01-23T12:33:18Z",
  19. "UpdateDate": "2015-01-23T12:33:18Z"
  20. }
  21. ]
  22. }
  23. }
Thank you! We've received your feedback.