ListPoliciesForUser

Last Updated: Aug 26, 2016

Interface description

 Lists authorization policies granted to a user.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Required. The parameter value is “ListPoliciesForUser”.

UserName

  • Type: String
  • Required: Yes
  • Description: User name. Example: zhangqiang

Return parameters

Policies

  • Type: Policy Type Array
  • Description: Authorization policy name list.

Error messages

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

Operation examples

Request example

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

Return example

XML format

  1. <ListPoliciesForUserResponse>
  2. <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
  3. <Policies>
  4. <Policy>
  5. <PolicyName>OSS-Administrator</PolicyPolicyName>
  6. <PolicyType>Custom</PolicyType>
  7. <Description>OSS administrator permission</Description>
  8. <DefaultVersion>v1</DefaultVersion>
  9. <AttachDate>2015-01-23T12:33:18Z</AttachDate>
  10. </Policy>
  11. <Policy>
  12. <PolicyName>ReadOnlyAccess</PolicyPolicyName>
  13. <PolicyType>System</PolicyType>
  14. <Description>Read-only permission</Description>
  15. <DefaultVersion>v1</DefaultVersion>
  16. <AttachDate>2015-02-18T17:22:08Z</AttachDate>
  17. </Policy>
  18. </Policies>
  19. </ListPoliciesForUserResponse>

JSON format

  1. {
  2. "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  3. "Policies": {
  4. "Policy": [
  5. {
  6. "PolicyName": "OSS-Administrator",
  7. "PolicyType": "Custom",
  8. "Description": "OSS administrator permission",
  9. "DefaultVersion": "v1",
  10. "AttachDate": "2015-01-23T12:33:18Z"
  11. },
  12. {
  13. "PolicyName": "ReadOnlyAccess",
  14. "PolicyType": "System",
  15. "Description": "Read-only permission",
  16. "DefaultVersion": "v1",
  17. "AttachDate": "2015-02-18T17:22:08Z"
  18. }
  19. ]
  20. }
  21. }
Thank you! We've received your feedback.