接口描述

列出授权策略

请求参数

Action
  • 类型:String
  • 必须:是
  • 描述:系统规定参数,取值:ListPolicies
PolicyType
  • 类型:String
  • 必须:否
  • 描述:指定Policy的类型, 取值System或Custom,如果没有指定则列出所有授权策略
Marker
  • 名称:Marker
  • 类型:String
  • 必须:否
  • 描述:当请求的返回结果被截断时,可以使用Marker获取从当前截断位置之后的内容
MaxItems
  • 名称:MaxIter
  • 类型:Integer
  • 必须:否
  • 取值范围:[1 - 1000]
  • 默认值:100
  • 描述:指定返回结果的条数,当返回结果达到MaxItems限制被截断时,返回参数IsTruncated将等于true

返回参数

IsTruncated
  • 类型:Boolean
  • 描述:请求返回结果是否被截断
Marker
  • 类型:String
  • 描述:当IsTruncatedtrue时才有此字段,当返回true时,需要继续调用此接口,并且使用Marker获取截断后的内容
Policies
  • 类型:Policy Array
  • 描述:授权策略名称列表

需要的权限

Action
ram:ListPolicies
Resource
acs:ram:*:${AccountId}:policy/*

请求示例

https://ram.aliyuncs.com/?Action=ListPolicies
&<公共请求参数>

返回示例

  • XML格式
    <ListPoliciesResponse>
        <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
        <IsTruncated>true</IsTruncated>
        <Marker>EXAMPLE</Marker>
        <Policies>
            <Policy>
                <PolicyName>OSS-Administrator</PolicyName>
                <PolicyType>Custom</PolicyType>
                <Description>OSS管理员权限</Description>
                <DefaultVersion>v1</DefaultVersion>
                <CreateDate>2015-01-23T12:33:18Z</CreateDate>
                <UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
                <AttachmentCount>0</AttachmentCount>
            </Policy>
            <Policy>
                <PolicyName>ReadOnlyAccess</PolicyName>
                <PolicyType>System</PolicyType>
                <Description>只读权限</Description>
                <DefaultVersion>v1</DefaultVersion>
                <CreateDate>2015-02-11T18:39:12Z</CreateDate>
                <UpdateDate>2015-02-19T09:43:16Z</UpdateDate>
                <AttachmentCount>0</AttachmentCount>
            </Policy>
        </Policies>
    </ListPoliciesResponse>
  • JSON格式
    {
        "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
        "IsTruncated": true,
        "Marker": "EXAMPLE",
        "Policies": {
            "Policy": [
                {
                    "PolicyName": "OSS-Administrator",
                    "PolicyType": "Custom",
                    "Description": "OSS管理员权限",
                    "DefaultVersion": "v1",
                    "CreateDate": "2015-01-23T12:33:18Z",
                    "UpdateDate": "2015-01-23T12:33:18Z",
                    "AttachmentCount": 3
                },
                {
                    "PolicyName": "ReadOnlyAccess",
                    "PolicyType": "System",
                    "Description": "只读权限",
                    "DefaultVersion": "v1",
                    "CreateDate": "2015-02-11T18:39:12Z",
                    "UpdateDate": "2015-02-19T09:43:16Z",
                    "AttachmentCount": 1
                }
            ]
        }
    }