Updates the basic information about a RAM user.

Debug

Use API Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes UpdateUser

The name of this action.

Value: UpdateUser

UserName String Yes Alice The username.
NewComments String No This is a cloud computing engineer. The comment on the new RAM user. It must be 1 to 128 characters in length.
NewDisplayName String No Bob The display name of the new RAM user.
NewEmail String No bob@example.com The email address of the new RAM user.
NewMobilePhone String No 86-1860000****

The mobile phone number of the new RAM user.

Format: International area code-mobile phone number

NewUserName String No Bob

The username of the new RAM user. It must be 1 to 64 characters in length.

Pattern: ^[a-zA-Z0-9\.@\-_]+$

Response parameters

Parameter Type Example Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368 The request ID.
User N/A N/A The RAM user information.
Comments String This is a cloud computing engineer. The comment.
CreateDate String 2015-01-23T12:33:18Z The date and time when the RAM user was created.
DisplayName String Bob The display name.
Email String bob@example.com The email address of the RAM user.
MobilePhone String 86-1860000**** The mobile phone number of the RAM user.
 └UpdateDate String 2015-02-11T03:15:21Z The date and time when the user information was modified.
UserId String 122748924538**** The ID of the RAM user.
UserName String Bob The username.

Examples

Request example

https://ram.aliyuncs.com/?Action=UpdateUser
&UserName=Alice
&NewUserName=Bob
&NewMobilePhone=86-1860000****
&NewEmail=bob@example.com
&<Common parameters>

Response example

XML format

<CreateUserResponse>
  <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
  <User>
    <UserId>122748924538****</UserId>
    <UserName>Bob</UserName>
    <DisplayName>Bob</DisplayName>
    <MobilePhone>86-1860000****</MobilePhone>
    <Email>bob@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>
</CreateUserResponse>

JSON format

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

Errors

For a list of error codes, visit the API Error Center.