Modifies information about a user.
Usage notes
You can modify FirstName
, LastName
, DisplayName
, Email
, and Description
for a user. You cannot modify UserName
for a user.
This topic provides an example on how to change the email address of the user whose
ID is u-00q8wbq42wiltcrk****
to AliceLee@example.com
.
Limits
You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateUser |
The operation that you want to perform. Set the value to UpdateUser. |
DirectoryId | String | Yes | d-00fc2p61**** |
The ID of the directory. |
UserId | String | Yes | u-00q8wbq42wiltcrk**** |
The ID of the user. |
NewFirstName | String | No | Alice |
The new first name of the user. |
NewLastName | String | No | Lee |
The new last name of the user. |
NewDisplayName | String | No | AliceLee |
The new display name of the user. |
NewDescription | String | No | This is a user. |
The new description of the user. |
NewEmail | String | No | AliceLee@example.com |
The new email address of the user. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
User | Object |
The information about the user. |
|
Status | String | Enabled |
The status of the user. Valid values:
|
UserName | String | Alice |
The name of the user. |
String | AliceLee@example.com |
The email address of the user. |
|
Description | String | This is a user. |
The description of the user. |
UserId | String | u-00q8wbq42wiltcrk**** |
The ID of the user. |
FirstName | String | Alice |
The first name of the user. |
CreateTime | String | 2021-10-26T03:03:42Z |
The time when the user was created. |
ProvisionType | String | Manual |
The type of the user. Valid values:
|
DisplayName | String | Alice |
The display name of the user. |
UpdateTime | String | 2021-10-26T07:32:32Z |
The time when the information about the user was modified. |
LastName | String | Lee |
The last name of the user. |
RequestId | String | F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A |
The ID of the request. |
Examples
Sample requests
https://[Endpoint]/?Action=UpdateUser
&DirectoryId=d-00fc2p61****
&UserId=u-00q8wbq42wiltcrk****
&NewEmail=AliceLee@example.com
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<UpdateUserResponse>
<User>
<Status>Enabled</Status>
<UserName>Alice</UserName>
<Email>AliceLee@example.com</Email>
<Description>This is a user.</Description>
<UserId>u-00q8wbq42wiltcrk****</UserId>
<FirstName>Alice</FirstName>
<CreateTime>2021-10-26T03:03:42Z</CreateTime>
<ProvisionType>Manual</ProvisionType>
<DisplayName>Alice</DisplayName>
<UpdateTime>2021-10-26T07:32:32Z</UpdateTime>
<LastName>Lee</LastName>
</User>
<RequestId>F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A</RequestId>
</UpdateUserResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"User" : {
"Status" : "Enabled",
"UserName" : "Alice",
"Email" : "AliceLee@example.com",
"Description" : "This is a user.",
"UserId" : "u-00q8wbq42wiltcrk****",
"FirstName" : "Alice",
"CreateTime" : "2021-10-26T03:03:42Z",
"ProvisionType" : "Manual",
"DisplayName" : "Alice",
"UpdateTime" : "2021-10-26T07:32:32Z",
"LastName" : "Lee"
},
"RequestId" : "F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A"
}
Error codes
For a list of error codes, visit the API Error Center.