aws-cdk-lib.aws_cognito.StringAttribute

class StringAttribute

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

Implements ICustomAttribute

The String custom attribute type.

Example

new cognito.UserPool(this, 'myuserpool', {
  // ...
  standardAttributes: {
    fullname: {
      required: true,
      mutable: false,
    },
    address: {
      required: false,
      mutable: true,
    },
  },
  customAttributes: {
    'myappid': new cognito.StringAttribute({ minLen: 5, maxLen: 15, mutable: false }),
    'callingcode': new cognito.NumberAttribute({ min: 1, max: 3, mutable: true }),
    'isEmployee': new cognito.BooleanAttribute({ mutable: true }),
    'joinedOn': new cognito.DateTimeAttribute(),
  },
});

Initializer

new StringAttribute(props?: StringAttributeProps)

Parameters

  • props StringAttributeProps

Methods

NameDescription
bind()Bind this custom attribute type to the values as expected by CloudFormation.

bind()

public bind(): CustomAttributeConfig

Returns

  • CustomAttributeConfig

Bind this custom attribute type to the values as expected by CloudFormation.