Amazon Cognito Identity Provider
  1. Root
Amazon Cognito Identity Provider
  • Root
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
  1. Root

/

POST
/
Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user.
For custom attributes, you must prepend the custom: prefix to the attribute name.
In addition to updating user attributes, this API can also be used to mark phone and email as verified.
Calling this action requires developer credentials.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/' \
--header 'X-Amz-Target;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "UserPoolId": "string",
    "Username": "string",
    "UserAttributes": [],
    "ClientMetadata": {
        "property1": "string",
        "property2": "string"
    }
}'
Response Response Example
200 - Example 1
{}

Request

Header Params
X-Amz-Target
string 
required
Body Params application/json
Represents the request to update the user's attributes as an administrator.
UserPoolId
string 
required
The user pool ID for the user pool where you want to update user attributes.
>= 1 characters<= 55 characters
Match pattern:
[\w-]+_[0-9a-zA-Z]+
Username
string <password>
required
The user name of the user for whom you want to update user attributes.
>= 1 characters<= 128 characters
Match pattern:
[\p{L}\p{M}\p{S}\p{N}\p{P}]+
UserAttributes
array[object (AttributeType) {2}] 
required
An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the custom: prefix to the attribute name.
If your user pool requires verification before Amazon Cognito updates an attribute value that you specify in this request, Amazon Cognito doesn’t immediately update the value of that attribute. After your user receives and responds to a verification message to verify the new value, Amazon Cognito updates the attribute value. Your user can sign in and receive messages with the original attribute value until they verify the new value.
To update the value of an attribute that requires verification in the same API request, include the email_verified or phone_number_verified attribute, with a value of true. If you set the email_verified or phone_number_verified value for an email or phone_number attribute that requires verification to true, Amazon Cognito doesn’t send a verification message to your user.
Name
string 
required
The name of the attribute.
>= 1 characters<= 32 characters
Match pattern:
[\p{L}\p{M}\p{S}\p{N}\p{P}]+
Value
string <password>
optional
The value of the attribute.
<= 2048 characters
ClientMetadata
object 
optional
A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.
You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminUpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminUpdateUserAttributes request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.
For more information, see Customizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.
Examples

Responses

🟢200Success
application/json
Body
object {0}
🟠480ResourceNotFoundException
🟠481InvalidParameterException
🟠482UnexpectedLambdaException
🟠483UserLambdaValidationException
🟠484InvalidLambdaResponseException
🟠485AliasExistsException
🟠486TooManyRequestsException
🟠487NotAuthorizedException
🟠488UserNotFoundException
🟠489InternalErrorException
🟠490InvalidSmsRoleAccessPolicyException
🟠491InvalidEmailRoleAccessPolicyException
🟠492InvalidSmsRoleTrustRelationshipException
Modified at 2023-08-15 07:11:06
Previous
/
Next
/
Built with