aws-cdk-lib.aws_cognito.CustomAttributeConfig

interface CustomAttributeConfig

LanguageType name
.NETAmazon.CDK.AWS.Cognito.CustomAttributeConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscognito#CustomAttributeConfig
Javasoftware.amazon.awscdk.services.cognito.CustomAttributeConfig
Pythonaws_cdk.aws_cognito.CustomAttributeConfig
TypeScript (source)aws-cdk-lib » aws_cognito » CustomAttributeConfig

Obtainable from BooleanAttribute.bind(), DateTimeAttribute.bind(), NumberAttribute.bind(), StringAttribute.bind()

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

Example

// 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

NameTypeDescription
dataTypestringThe data type of the custom attribute.
mutable?booleanSpecifies whether the value of the attribute can be changed.
numberConstraints?NumberAttributeConstraintsThe constraints for a custom attribute of the 'Number' data type.
stringConstraints?StringAttributeConstraintsThe constraints for a custom attribute of 'String' data type.

dataType

Type: string

The data type of the custom attribute.

See also: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SchemaAttributeType.html#CognitoUserPools-Type-SchemaAttributeType-AttributeDataType


mutable?

Type: boolean (optional, default: false)

Specifies whether the value of the attribute can be changed.

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.


numberConstraints?

Type: NumberAttributeConstraints (optional, default: None.)

The constraints for a custom attribute of the 'Number' data type.


stringConstraints?

Type: StringAttributeConstraints (optional, default: None.)

The constraints for a custom attribute of 'String' data type.