閱讀712 返回首頁    go 搜狐


ListGroupsForUser__組管理接口_RAM API文檔_訪問控製-阿裏雲

接口描述

 列出指定子用戶所加入的組信息

請求參數

Action

  • 類型:String
  • 必須:是
  • 描述:操作名稱,取值:ListGroupsForUser

UserName

  • 類型:String
  • 必須:是
  • 描述:用戶名稱

返回參數

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

需要的權限

Action

ram:ListGroupsForUser

Resource

acs:ram:*:${AccountId}:user/${UserName}

錯誤信息

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.

操作示例

請求示例

https://ram.aliyuncs.com/?Action=ListGroupsForUser
&UserName=zhangqiang
&<公共請求參數>

返回示例

XML格式

<ListGroupsForUserResponse>
  <RequestId>0945BF6F-54A4-C384-C89C-C500DCEE367C</RequestId>
  <Groups>
    <Group>
      <GroupName>Dev-Team</GroupName>
      <Comments>開發團隊</Comments>
      <JoinDate>2015-01-23T12:33:18Z</JoinDate>
    </Group>
    <Group>
      <GroupName>QA-Team</GroupName>
      <Comments>測試團隊</Comments>
      <JoinDate>2015-02-18T17:22:08Z</JoinDate>
    </Group>
  </Groups>
</ListGroupsForUserResponse>

JSON格式

{
    "RequestId": "0945BF6F-54A4-C384-C89C-C500DCEE367C",
    "Groups": {
        "Group": [
            {
                "GroupName": "Dev-Team",
                "Comments": "開發團隊",
                "JoinDate" : "2015-01-23T12:33:18Z"
            },
            {
                "GroupName": "QA-Team",
                "Comments": "測試團隊",
                "JoinDate" : "2015-02-18T17:22:08Z"
            }
        ]
    }
}

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

  上一篇:go RemoveUserFromGroup__組管理接口_RAM API文檔_訪問控製-阿裏雲
  下一篇:go ListUsersForGroup__組管理接口_RAM API文檔_訪問控製-阿裏雲