閱讀462 返回首頁    go 阿裏雲 go 技術社區[雲棲]


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

接口描述

 更新用戶的基本信息

請求參數

Action

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

UserName

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

NewUserName

  • 類型:String
  • 必須:否
  • 描述:指定新用戶名
  • 格式:^[a-zA-Z0-9.@-_]+$

NewDisplayName

  • 類型:String
  • 必須:否
  • 描述:指定新顯示名稱

NewMobilePhone

  • 類型:String
  • 必須:否
  • 描述:指定RAM用戶新手機號
  • 格式:國際區號-號碼;例如:86-18600008888

NewEmail

  • 類型:String
  • 必須:否
  • 描述:指定RAM用戶的新郵箱

NewComments

  • 類型:String
  • 必須:否
  • 描述:指定新備注, 最大長度128個字符。

返回參數

User

需要的權限

Action

ram:UpdateUser

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.
InvalidParameter.NewUserName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "NewUserName" contains invalid chars.
InvalidParameter.NewUserName.Length
  • HTTP Status:400
  • Error Message:The parameter - "NewUserName" beyond the length limit.
InvalidParameter.NewDisplayName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "NewDisplayName" contains invalid chars.
InvalidParameter.NewDisplayName.Length
  • HTTP Status:400
  • Error Message:The parameter - "NewDisplayName" beyond the length limit.
InvalidParameter.NewComments.Length
  • HTTP Status:400
  • Error Message:The parameter - "NewComments" beyond the length limit.
InvalidParameter.NewMobilePhone.Format
  • HTTP Status:400
  • Error Message:The format of the parameter - "NewMobilePhone" is incorrect.
InvalidParameter.NewEmail.Format
  • HTTP Status:400
  • Error Message:The format of the parameter - "NewEmail" is incorrect.
EntityNotExist.User
  • HTTP Status:404
  • Error Message:The user does not exist.
EntityAlreadyExists.User
  • HTTP Status:409
  • Error Message:The user does already EXIST.

操作示例

請求示例

https://ram.aliyuncs.com/?Action=UpdateUser
&UserName=zhangqiang
&NewUserName=xiaoqiang
&NewMobilePhone=86-18600008888
&NewEmail=zhangqiang@example.com
&<公共請求參數>

返回示例

XML格式

<CreateUserResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
    <User>
        <UserId>1227489245380721</UserId>
        <UserName>xiaoqiang</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>
    </User>
</CreateUserResponse>

JSON格式

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
    "User": {
        "UserId": "1227489245380721",
        "UserName": "xiaoqiang",
        "DisplayName": "張強",
        "MobilePhone": "86-18600008888",
        "Email": "zhangqiang@example.com",
        "Comments": "這是一位雲計算工程師",
        "CreateDate": "2015-01-23T12:33:18Z",
        "UpdateDate": "2015-02-11T03:15:21Z"
    }
}

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

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