阅读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文档_访问控制-阿里云