Modifies the information about a RAM user.

This topic provides an example on how to change the name of a RAM user from zhangq**** to xiaoq****.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateUser

The operation that you want to perform. Set the value to UpdateUser.

UserName String Yes zhangq****

The username of the RAM user.

NewUserName String Yes xiaoq****

The new username of the RAM user.

The username must be 1 to 64 characters in length, and can contain letters, digits, periods (.), hyphens (-), and underscores (_).

NewDisplayName String No xiaoq****

The new display name of the RAM user.

The name must be 1 to 128 characters in length.

NewMobilePhone String No 86-1860000****

The new mobile phone number of the RAM user.

Format: <Country code>-<Mobile phone number>.

Note This parameter can be returned only on the China site (aliyun.com).
NewEmail String No xiaoq****@example.com

The new email address of the RAM user.

Note This parameter can be returned only on the China site (aliyun.com).
NewComments String No This is a cloud computing engineer.

The new description of the RAM user.

The description must be 1 to 128 characters in length.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
User Object

The information about the RAM user.

DisplayName String xiaoq****

The display name of the RAM user.

Email String xiaoq****@example.com

The email address of the RAM user.

Note This parameter can be returned only on the China site (aliyun.com).
UpdateDate String 2015-02-11T03:15:21Z

The point in time when the information about the RAM user was last modified. The time is displayed in UTC.

MobilePhone String 86-1860000****

The mobile phone number of the RAM user.

Note This parameter can be returned only on the China site (aliyun.com).
UserId String 122748924538****

The ID of the RAM user.

Comments String This is a cloud computing engineer.

The description of the RAM user.

CreateDate String 2015-01-23T12:33:18Z

The point in time when the RAM user was created. The time is displayed in UTC.

UserName String xiaoq****

The username of the RAM user.

RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Examples

Sample requests

https://ram.aliyuncs.com/?Action=UpdateUser
&UserName=zhangq****
&NewUserName=xiaoq****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateUserResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
    <User>
        <UserId>122748924538****</UserId>
        <UserName>xiaoq****</UserName>
        <DisplayName>xiaoq*****</DisplayName>
        <MobilePhone>86-1860000****</MobilePhone>
        <Email>xiaoq****@example.com</Email>
        <Comments>This is a cloud computing engineer.</Comments>
        <CreateDate>2015-01-23T12:33:18Z</CreateDate>
        <UpdateDate>2015-02-11T03:15:21Z</UpdateDate>
    </User>
</UpdateUserResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "04F0F334-1335-436C-A1D7-6C044FE73368",
  "User" : {
    "UserId" : "122748924538****",
    "UserName" : "xiaoq****",
    "DisplayName" : "xiaoq*****",
    "MobilePhone" : "86-1860000****",
    "Email" : "xiaoq****@example.com",
    "Comments" : "This is a cloud computing engineer.",
    "CreateDate" : "2015-01-23T12:33:18Z",
    "UpdateDate" : "2015-02-11T03:15:21Z"
  }
}