Skip to content
v2.274.0

CustomAttributeConfig Struct ​

Configuration that will be fed into CloudFormation for any custom attribute type.

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 customAttributeConfig: cognito.CustomAttributeConfig = {
  dataType: 'dataType',

  // the properties below are optional
  mutable: false,
  numberConstraints: {
    max: 123,
    min: 123,
  },
  stringConstraints: {
    maxLen: 123,
    minLen: 123,
  },
};

Properties ​

dataTypestringdata_typestrdataTypeStringDataTypestringDataType*stringrequired#
The data type of the custom attribute.
mutableoptionalbooleanmutableoptionalboolmutableoptionalBooleanMutableoptionalboolMutableoptional*bool= false#
Specifies whether the value of the attribute can be changed.
notes

For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute.

numberConstraintsoptionalNumberAttributeConstraintsnumber_constraintsoptionalNumberAttributeConstraintsnumberConstraintsoptionalNumberAttributeConstraintsNumberConstraintsoptionalNumberAttributeConstraintsNumberConstraintsoptionalNumberAttributeConstraints= None.#
The constraints for a custom attribute of the 'Number' data type.
stringConstraintsoptionalStringAttributeConstraintsstring_constraintsoptionalStringAttributeConstraintsstringConstraintsoptionalStringAttributeConstraintsStringConstraintsoptionalStringAttributeConstraintsStringConstraintsoptionalStringAttributeConstraints= None.#
The constraints for a custom attribute of 'String' data type.