閱讀412 返回首頁    go 財經資訊


ListEntitiesForPolicy__授權策略管理接口_RAM API文檔_訪問控製-阿裏雲

接口描述

 列出引用授權策略的實體

請求參數

Action

  • 類型:String
  • 必須:是
  • 描述:係統規定參數,取值:ListEntitiesForPolicy

PolicyType

  • 類型:String
  • 必須:是
  • 描述:指定Policy的類型, 取值System或Custom

PolicyName

  • 類型:String
  • 必須:是
  • 描述:授權策略名稱

返回參數

Groups

  • 類型:Group Type Array
  • 描述:組信息集合

Users

  • 類型:User Type Array
  • 描述:用戶信息集合

Roles

  • 類型:User Type Array
  • 描述:角色信息結合

需要的權限

Action

ram:ListEntitiesForPolicy

Resource

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

錯誤信息

InvalidParameter.PolicyType
  • HTTP Status:400
  • Error Message:The parameter - "PolicyType" is incorrect.
InvalidParameter.PolicyName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "PolicyNam" contains invalid chars.
InvalidParameter.PolicyName.Length
  • HTTP Status:400
  • Error Message:The parameter - "PolicyName" beyond the length limit.
EntityNotExist.Policy
  • HTTP Status:404
  • Error Message:The policy does not exist.

操作示例

請求示例

https://ram.aliyuncs.com/?Action=ListEntitiesForPolicy
&PolicyName=OSS-Administrator
&PolicyType=Custom
&<公共請求參數>

返回示例

XML格式

<ListEntitiesForPolicyResponse>
    <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
    <Groups>
        <Group>
            <GroupName>QA-Team</GroupName>
            <Comments>測試團隊</Comments>
            <AttachDate>2015-01-23T12:33:18Z</AttachDate>
        </Group>
        <Group>
            <GroupName>Dev-Team</GroupName>
            <Comments>開發團隊</Comments>
            <AttachDate>2015-02-18T17:22:08Z</AttachDate>
        </Group>
    </Groups>
    <Users>
        <User>
            <UserId>1227489245380721</UserId>
            <UserName>zhangqiang</UserName>
            <DisplayName>張強</DisplayName>
            <AttachDate>2015-01-23T12:33:18Z</AttachDate>
        </User>
        <User>
            <UserId>1406498224724456</UserId>
            <UserName>lili</UserName>
            <DisplayName>李麗</DisplayName>
            <AttachDate>2015-02-18T17:22:08Z</AttachDate>
        </User>
    </Users>
    <Roles>
        <Role>
            <RoleId>901234567890123</RoleId>
            <RoleName>ECSAdmin</RoleName>
            <Arn>acs:ram::1234567890123456:role/ECSAdmin</Arn>
            <Description>ECS管理角色</Description>
            <AttachDate>2015-01-23T12:33:18Z</AttachDate>
        </Role>
        <Role>
            <RoleId>901234567890456</RoleId>
            <RoleName>OSSReadonlyAccess</RoleName>
            <Description>OSS隻讀訪問角色</Description>
            <Arn>acs:ram::1234567890123456:role/OSSReadonlyAccess</Arn>
            <AttachDate>2015-01-23T12:33:18Z</AttachDate>
        </Role>
    </Roles>
</ListEntitiesForPolicyResponse>

JSON格式

{
  "RequestId" : "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  "Groups" : {
    "Group" : [
      {
        "GroupName": "QA-Team",
        "Comments": "測試團隊",
        "AttachDate" : "2015-01-23T12:33:18Z"
      },
      {
        "GroupName": "Dev-Team",
        "Comments": "開發團隊",
        "AttachDate" : "2015-02-18T17:22:08Z"
      }
    ]
  },
  "Users" : {
    "User" : [
      {
        "UserId" : "1227489245380721",
        "UserName" : "zhangqiang",
        "DisplayName": "張強",
        "AttachDate" : "2015-01-23T12:33:18Z"
      },
      {
        "UserId" : "1406498224724456",
        "UserName" : "lili",
        "DisplayName": "李麗",
        "AttachDate" : "2015-02-18T17:22:08Z"
      }
    ]
  },
  "Roles" : {
    "Role" : [
      {
        "RoleId" : "1227489245380721",
        "RoleName" : "ECSAdmin",
        "Arn": "acs:ram::1234567890123456:role/ECSAdmin",
        "Description": "ECS管理角色",
        "AttachDate" : "2015-01-23T12:33:18Z"
      },
      {
        "RoleId" : "1406498224724456",
        "RoleName" : "OSSReadonlyAccess",
        "Arn": "acs:ram::1234567890123456:role/OSSReadonlyAccess",
        "Description": "OSS隻讀訪問角色",
        "AttachDate" : "2015-02-18T17:22:08Z"
      }
    ]
  }
}

最後更新:2016-11-23 17:16:05

  上一篇:go DetachPolicyFromRole__授權策略管理接口_RAM API文檔_訪問控製-阿裏雲
  下一篇:go ListPoliciesForUser__授權策略管理接口_RAM API文檔_訪問控製-阿裏雲