ListPolicies

Last Updated: Aug 25, 2016

Interface description

 Lists authorization policies.

Request parameters

Action

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

PolicyType

  • Type: String
  • Required: No
  • Description: Authorization policy type. Value: “System” or “Custom”. If this parameter is not set, all authorization policies will be listed.

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

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.

Policies

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

Required permissions

Action

ram:ListPolicies

Resource

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

Operation examples

Request example

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

Return example

XML format

  1. <ListPoliciesResponse>
  2. <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
  3. <IsTruncated>true</IsTruncated>
  4. <Marker>EXAMPLE</Marker>
  5. <Policies>
  6. <Policy>
  7. <PolicyName>OSS-Administrator</PolicyName>
  8. <PolicyType>Custom</PolicyType>
  9. <Description>OSS administrator permission</Description>
  10. <DefaultVersion>v1</DefaultVersion>
  11. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  12. <UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
  13. <AttachmentCount>0</AttachmentCount>
  14. </Policy>
  15. <Policy>
  16. <PolicyName>ReadOnlyAccess</PolicyName>
  17. <PolicyType>System</PolicyType>
  18. <Description>Read-only permission</Description>
  19. <DefaultVersion>v1</DefaultVersion>
  20. <CreateDate>2015-02-11T18:39:12Z</CreateDate>
  21. <UpdateDate>2015-02-19T09:43:16Z</UpdateDate>
  22. <AttachmentCount>0</AttachmentCount>
  23. </Policy>
  24. </Policies>
  25. </ListPoliciesResponse>

JSON format

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