CustomAttributeConfig

class aws_cdk.aws_cognito.CustomAttributeConfig(*, data_type, mutable=None, number_constraints=None, string_constraints=None)

Bases: object

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

Parameters
  • data_type (str) – The data type of the custom attribute.

  • mutable (Optional[bool]) – 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. Default: false

  • number_constraints (Optional[NumberAttributeConstraints]) – The constraints for a custom attribute of the ‘Number’ data type. Default: - None.

  • string_constraints (Optional[StringAttributeConstraints]) – The constraints for a custom attribute of ‘String’ data type. Default: - None.

Attributes

data_type

The data type of the custom attribute.

See

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

Return type

str

mutable

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.

Default

false

Return type

Optional[bool]

number_constraints

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

Default
  • None.

Return type

Optional[NumberAttributeConstraints]

string_constraints

The constraints for a custom attribute of ‘String’ data type.

Default
  • None.

Return type

Optional[StringAttributeConstraints]