public class UpdateUserAttributesRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
Allows a user to update a specific attribute (one at a time).
Amazon Cognito doesn't evaluate Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you can't use IAM credentials to authorize requests, and you can't grant IAM permissions in policies. For more information about authorization models in Amazon Cognito, see Using the Amazon Cognito native and OIDC APIs.
This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers require you to register an origination phone number before you can send SMS messages to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, activate their accounts, or sign in.
If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service, Amazon Simple Notification Service might place your account in the SMS sandbox. In sandbox mode , you can send messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer Guide.
| Constructor and Description |
|---|
UpdateUserAttributesRequest() |
| Modifier and Type | Method and Description |
|---|---|
UpdateUserAttributesRequest |
addClientMetadataEntry(java.lang.String key,
java.lang.String value)
A map of custom key-value pairs that you can provide as input for any
custom workflows that this action initiates.
|
UpdateUserAttributesRequest |
clearClientMetadataEntries()
Removes all the entries added into ClientMetadata.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAccessToken()
A valid access token that Amazon Cognito issued to the user whose user
attributes you want to update.
|
java.util.Map<java.lang.String,java.lang.String> |
getClientMetadata()
A map of custom key-value pairs that you can provide as input for any
custom workflows that this action initiates.
|
java.util.List<AttributeType> |
getUserAttributes()
An array of name-value pairs representing user attributes.
|
int |
hashCode() |
void |
setAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose user
attributes you want to update.
|
void |
setClientMetadata(java.util.Map<java.lang.String,java.lang.String> clientMetadata)
A map of custom key-value pairs that you can provide as input for any
custom workflows that this action initiates.
|
void |
setUserAttributes(java.util.Collection<AttributeType> userAttributes)
An array of name-value pairs representing user attributes.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UpdateUserAttributesRequest |
withAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose user
attributes you want to update.
|
UpdateUserAttributesRequest |
withClientMetadata(java.util.Map<java.lang.String,java.lang.String> clientMetadata)
A map of custom key-value pairs that you can provide as input for any
custom workflows that this action initiates.
|
UpdateUserAttributesRequest |
withUserAttributes(AttributeType... userAttributes)
An array of name-value pairs representing user attributes.
|
UpdateUserAttributesRequest |
withUserAttributes(java.util.Collection<AttributeType> userAttributes)
An array of name-value pairs representing user attributes.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.util.List<AttributeType> getUserAttributes()
An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the custom: prefix
to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the custom:
prefix to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
public void setUserAttributes(java.util.Collection<AttributeType> userAttributes)
An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the custom: prefix
to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
userAttributes - An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the
custom: prefix to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
public UpdateUserAttributesRequest withUserAttributes(AttributeType... userAttributes)
An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the custom: prefix
to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
Returns a reference to this object so that method calls can be chained together.
userAttributes - An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the
custom: prefix to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
public UpdateUserAttributesRequest withUserAttributes(java.util.Collection<AttributeType> userAttributes)
An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the custom: prefix
to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
Returns a reference to this object so that method calls can be chained together.
userAttributes - An array of name-value pairs representing user attributes.
For custom attributes, you must prepend the
custom: prefix to the attribute name.
If you have set an attribute to require verification before Amazon Cognito updates its value, this request 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.
public java.lang.String getAccessToken()
A valid access token that Amazon Cognito issued to the user whose user attributes you want to update.
Constraints:
Pattern: [A-Za-z0-9-_=.]+
A valid access token that Amazon Cognito issued to the user whose user attributes you want to update.
public void setAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose user attributes you want to update.
Constraints:
Pattern: [A-Za-z0-9-_=.]+
accessToken - A valid access token that Amazon Cognito issued to the user whose user attributes you want to update.
public UpdateUserAttributesRequest withAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose user attributes you want to update.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: [A-Za-z0-9-_=.]+
accessToken - A valid access token that Amazon Cognito issued to the user whose user attributes you want to update.
public java.util.Map<java.lang.String,java.lang.String> getClientMetadata()
A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to user pool
triggers. When you use the UpdateUserAttributes 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
UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to user
pool triggers. When you use the UpdateUserAttributes 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 UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
public void setClientMetadata(java.util.Map<java.lang.String,java.lang.String> clientMetadata)
A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to user pool
triggers. When you use the UpdateUserAttributes 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
UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
clientMetadata - A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to
user pool triggers. When you use the UpdateUserAttributes 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
UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
public UpdateUserAttributesRequest withClientMetadata(java.util.Map<java.lang.String,java.lang.String> clientMetadata)
A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to user pool
triggers. When you use the UpdateUserAttributes 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
UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
Returns a reference to this object so that method calls can be chained together.
clientMetadata - A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to
user pool triggers. When you use the UpdateUserAttributes 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
UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
public UpdateUserAttributesRequest addClientMetadataEntry(java.lang.String key, java.lang.String value)
A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.
You create custom workflows by assigning Lambda functions to user pool
triggers. When you use the UpdateUserAttributes 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
UpdateUserAttributes 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.
When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:
Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
Validate the ClientMetadata value.
Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
The method adds a new key-value pair into ClientMetadata parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into ClientMetadata.value - The corresponding value of the entry to be added into
ClientMetadata.public UpdateUserAttributesRequest clearClientMetadataEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object