閱讀683 返回首頁    go windows


GetUser__用戶管理接口_RAM API文檔_訪問控製-阿裏雲

接口描述

 獲取用戶的詳細信息

請求參數

Action

  • 名稱:Action
  • 類型:String
  • 必須:是
  • 描述:操作接口名,係統規定參數,取值:GetUser

UserName

  • 名稱:UserName
  • 類型:String
  • 必須:是
  • 描述:指定用戶名。例:zhangqiang
  • 格式:^[a-zA-Z0-9.@-_]+$

返回參數

User

需要的權限

Action

ram:GetUser

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=GetUser
&UserName=zhangqiang
&<公共請求參數>

返回示例

XML格式

<GetUserResponse>
    <RequestId>2D69A58F-345C-4FDE-88E4-BF5189484043</RequestId>
    <User>
        <UserId>1227489245380721</UserId>
        <UserName>zhangqiang</UserName>
        <DisplayName>張強</DisplayName>
        <MobilePhone>86-18600008888</MobilePhone>
        <Email>zhangqiang@example.com</Email>
        <Comments>這是一位雲計算工程師</Comments>
        <CreateDate>2015-01-23T12:33:18Z</CreateDate>
        <UpdateDate>2015-02-11T03:15:21Z</UpdateDate>
        <LastLoginDate>2015-01-23T12:33:18Z</LastLoginDate>
    </User>
    <UserId>1227489245380721</UserId>
</GetUserResponse>

JSON格式

{
    "RequestId": "2D69A58F-345C-4FDE-88E4-BF5189484043",
    "User": {
        "UserId": "1227489245380721",
        "UserName": "zhangqiang",
        "DisplayName": "張強",
        "MobilePhone": "86-18600008888",
        "Email": "zhangqiang@example.com",
        "Comments": "這是一位雲計算工程師",
        "CreateDate": "2015-01-23T12:33:18Z",
        "UpdateDate": "2015-02-11T03:15:21Z",
        "LastLoginDate": "2015-01-23T12:33:18Z"
    }
}

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

  上一篇:go CreateUser__用戶管理接口_RAM API文檔_訪問控製-阿裏雲
  下一篇:go UpdateUser__用戶管理接口_RAM API文檔_訪問控製-阿裏雲