Skip to content
v2.277.0

UserAttributeUpdateSettingsProperty Struct ​

The settings for updates to user attributes.

These settings include the property AttributesRequireVerificationBeforeUpdate , a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see Verifying updates to email addresses and phone numbers .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const userAttributeUpdateSettingsProperty: cognito.CfnUserPool.UserAttributeUpdateSettingsProperty = {
  attributesRequireVerificationBeforeUpdate: ['attributesRequireVerificationBeforeUpdate'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cognito as cognito

user_attribute_update_settings_property = cognito.CfnUserPool.UserAttributeUpdateSettingsProperty(
    attributes_require_verification_before_update=["attributesRequireVerificationBeforeUpdate"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cognito.*;

UserAttributeUpdateSettingsProperty userAttributeUpdateSettingsProperty = UserAttributeUpdateSettingsProperty.builder()
        .attributesRequireVerificationBeforeUpdate(List.of("attributesRequireVerificationBeforeUpdate"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cognito;

var userAttributeUpdateSettingsProperty = new UserAttributeUpdateSettingsProperty {
    AttributesRequireVerificationBeforeUpdate = new [] { "attributesRequireVerificationBeforeUpdate" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

userAttributeUpdateSettingsProperty := &UserAttributeUpdateSettingsProperty{
	AttributesRequireVerificationBeforeUpdate: []*string{
		jsii.String("attributesRequireVerificationBeforeUpdate"),
	},
}

Properties ​

attributesRequireVerificationBeforeUpdatestring[]attributes_require_verification_before_updatetyping.List[str]attributesRequireVerificationBeforeUpdateList<String>AttributesRequireVerificationBeforeUpdatestring[]AttributesRequireVerificationBeforeUpdate*[]*stringrequired#
Requires that your user verifies their email address, phone number, or both before Amazon Cognito updates the value of that attribute.
notes

When you update a user attribute that has this option activated, Amazon Cognito sends a verification message to the new phone number or email address. Amazon Cognito doesn’t change the value of the attribute until your user responds to the verification message and confirms the new value.

When AttributesRequireVerificationBeforeUpdate is false, your user pool doesn't require that your users verify attribute changes before Amazon Cognito updates them. In a user pool where AttributesRequireVerificationBeforeUpdate is false, API operations that change attribute values can immediately update a user’s email or phone_number attribute.