Modifies the information of a RAM user.
This topic provides an example to show how to modify the name of a RAM user from test@example.onaliyun.com
to new@example.onaliyun.com
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateUser |
The operation that you want to perform. Set the value to UpdateUser. |
UserPrincipalName | String | No | test@example.onaliyun.com |
The logon name of the RAM user. Note You must specify only one of the following parameters:
UserPrincipalName and UserId .
|
UserId | String | No | 20732900249392**** |
The ID of the RAM user. Note You must specify only one of the following parameters:
UserPrincipalName and UserId .
|
NewUserPrincipalName | String | No | new@example.onaliyun.com |
The new logon name of the RAM user. The name is in the format of The value of |
NewDisplayName | String | No | new |
The new display name of the RAM user. The name must be 1 to 24 characters in length. |
NewMobilePhone | String | No | 86-1868888**** |
The new mobile phone number of the RAM user. Format: Country calling code-Mobile phone number. Note This parameter applies only to the China site (aliyun.com).
|
NewEmail | String | No | alice@example.com |
The new email address of the RAM user. Note This parameter applies only to 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 parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 1B56DD42-6962-4F89-A19C-079EED1F0FE3 |
The ID of the request. |
User | Struct |
The information of the RAM user. |
|
Comments | String | This is a cloud computing engineer. |
The description of the RAM user. |
CreateDate | String | 2020-10-12T09:12:00Z |
The time when the RAM user was created. |
DisplayName | String | new |
The display name of the RAM user. |
String | alice@example.com |
The email address of the RAM user. Note This parameter applies only to the China site (aliyun.com).
|
|
LastLoginDate | String | 2020-10-12T09:12:00Z |
The last time when the RAM user logged on to the console. |
MobilePhone | String | 86-1868888**** |
The mobile phone number of the RAM user. Note This parameter applies only to the China site (aliyun.com).
|
UpdateDate | String | 2020-10-13T09:19:49Z |
The time when the information of the RAM user was updated. |
UserId | String | 20732900249392**** |
The ID of the RAM user. |
UserPrincipalName | String | new@example.onaliyun.com |
The logon name of the RAM user. |
Examples
Sample requests
https://[Endpoint]/?Action=UpdateUser
&UserPrincipalName=test@example.onaliyun.com
&NewUserPrincipalName=new@example.onaliyun.com
&<Common request parameters>
Sample success responses
XML
format
<UpdateUserResponse>
<User>
<UpdateDate>2020-10-13T09:19:49Z</UpdateDate>
<Email>alice@example.com</Email>
<Comments>This is a cloud computing engineer.</Comments>
<UserId>20732900249392****</UserId>
<LastLoginDate>2020-10-12T09:12:00Z</LastLoginDate>
<DisplayName>new</DisplayName>
<UserPrincipalName>new@example.onaliyun.com</UserPrincipalName>
<CreateDate>2020-10-12T09:12:00Z</CreateDate>
<MobilePhone>86-1868888****</MobilePhone>
</User>
<RequestId>1B56DD42-6962-4F89-A19C-079EED1F0FE3</RequestId>
</UpdateUserResponse>
JSON
format
{
"User": {
"UpdateDate": "2020-10-13T09:19:49Z",
"Email": "alice@example.com",
"Comments": "This is a cloud computing engineer.",
"UserId": "20732900249392****",
"LastLoginDate": "2020-10-12T09:12:00Z",
"DisplayName": "new",
"UserPrincipalName": "new@example.onaliyun.com",
"CreateDate": "2020-10-12T09:12:00Z",
"MobilePhone": "86-1868888****"
},
"RequestId": "1B56DD42-6962-4F89-A19C-079EED1F0FE3"
}
Error codes
For a list of error codes, visit the API Error Center.