Skip to content
v2.276.0

CfnUserPool L1 construct ​

The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.

For more information on working with Amazon Cognito user pools, see Amazon Cognito User Pools and CreateUserPool .

If you don't specify a value for a parameter, Amazon Cognito sets it to a default value.

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';

declare const userPoolTags: any;
const cfnUserPool = new cognito.CfnUserPool(this, 'MyCfnUserPool', /* all optional props */ {
  accountRecoverySetting: {
    recoveryMechanisms: [{
      name: 'name',
      priority: 123,
    }],
  },
  adminCreateUserConfig: {
    allowAdminCreateUserOnly: false,
    inviteMessageTemplate: {
      emailMessage: 'emailMessage',
      emailSubject: 'emailSubject',
      smsMessage: 'smsMessage',
    },
    unusedAccountValidityDays: 123,
  },
  aliasAttributes: ['aliasAttributes'],
  autoVerifiedAttributes: ['autoVerifiedAttributes'],
  deletionProtection: 'deletionProtection',
  deviceConfiguration: {
    challengeRequiredOnNewDevice: false,
    deviceOnlyRememberedOnUserPrompt: false,
  },
  emailAuthenticationMessage: 'emailAuthenticationMessage',
  emailAuthenticationSubject: 'emailAuthenticationSubject',
  emailConfiguration: {
    configurationSet: 'configurationSet',
    emailSendingAccount: 'emailSendingAccount',
    from: 'from',
    replyToEmailAddress: 'replyToEmailAddress',
    sourceArn: 'sourceArn',
  },
  emailVerificationMessage: 'emailVerificationMessage',
  emailVerificationSubject: 'emailVerificationSubject',
  enabledMfas: ['enabledMfas'],
  issuerConfiguration: {
    type: 'type',
  },
  keyConfiguration: {
    keyType: 'keyType',
    kmsKeyArn: 'kmsKeyArn',
  },
  lambdaConfig: {
    createAuthChallenge: 'createAuthChallenge',
    customEmailSender: {
      lambdaArn: 'lambdaArn',
      lambdaVersion: 'lambdaVersion',
    },
    customMessage: 'customMessage',
    customSmsSender: {
      lambdaArn: 'lambdaArn',
      lambdaVersion: 'lambdaVersion',
    },
    defineAuthChallenge: 'defineAuthChallenge',
    inboundFederation: {
      lambdaArn: 'lambdaArn',
      lambdaVersion: 'lambdaVersion',
    },
    kmsKeyId: 'kmsKeyId',
    postAuthentication: 'postAuthentication',
    postConfirmation: 'postConfirmation',
    preAuthentication: 'preAuthentication',
    preSignUp: 'preSignUp',
    preTokenGeneration: 'preTokenGeneration',
    preTokenGenerationConfig: {
      lambdaArn: 'lambdaArn',
      lambdaVersion: 'lambdaVersion',
    },
    userMigration: 'userMigration',
    verifyAuthChallengeResponse: 'verifyAuthChallengeResponse',
  },
  mfaConfiguration: 'mfaConfiguration',
  policies: {
    passwordPolicy: {
      minimumLength: 123,
      passwordHistorySize: 123,
      requireLowercase: false,
      requireNumbers: false,
      requireSymbols: false,
      requireUppercase: false,
      temporaryPasswordValidityDays: 123,
    },
    signInPolicy: {
      allowedFirstAuthFactors: ['allowedFirstAuthFactors'],
    },
  },
  schema: [{
    attributeDataType: 'attributeDataType',
    developerOnlyAttribute: false,
    mutable: false,
    name: 'name',
    numberAttributeConstraints: {
      maxValue: 'maxValue',
      minValue: 'minValue',
    },
    required: false,
    stringAttributeConstraints: {
      maxLength: 'maxLength',
      minLength: 'minLength',
    },
  }],
  smsAuthenticationMessage: 'smsAuthenticationMessage',
  smsConfiguration: {
    eumsSms: {
      callerArn: 'callerArn',

      // the properties below are optional
      configurationSetName: 'configurationSetName',
      externalId: 'externalId',
      inEntityId: 'inEntityId',
      inTemplateId: 'inTemplateId',
      originationIdentity: 'originationIdentity',
      region: 'region',
    },
    externalId: 'externalId',
    snsCallerArn: 'snsCallerArn',
    snsRegion: 'snsRegion',
  },
  smsVerificationMessage: 'smsVerificationMessage',
  userAttributeUpdateSettings: {
    attributesRequireVerificationBeforeUpdate: ['attributesRequireVerificationBeforeUpdate'],
  },
  usernameAttributes: ['usernameAttributes'],
  usernameConfiguration: {
    caseSensitive: false,
  },
  userPoolAddOns: {
    advancedSecurityAdditionalFlows: {
      customAuthMode: 'customAuthMode',
    },
    advancedSecurityMode: 'advancedSecurityMode',
  },
  userPoolName: 'userPoolName',
  userPoolTags: userPoolTags,
  userPoolTier: 'userPoolTier',
  verificationMessageTemplate: {
    defaultEmailOption: 'defaultEmailOption',
    emailMessage: 'emailMessage',
    emailMessageByLink: 'emailMessageByLink',
    emailSubject: 'emailSubject',
    emailSubjectByLink: 'emailSubjectByLink',
    smsMessage: 'smsMessage',
  },
  webAuthnFactorConfiguration: 'webAuthnFactorConfiguration',
  webAuthnRelyingPartyId: 'webAuthnRelyingPartyId',
  webAuthnUserVerification: 'webAuthnUserVerification',
});
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_pool_tags: Any

cfn_user_pool = cognito.CfnUserPool(self, "MyCfnUserPool",
    account_recovery_setting=cognito.CfnUserPool.AccountRecoverySettingProperty(
        recovery_mechanisms=[cognito.CfnUserPool.RecoveryOptionProperty(
            name="name",
            priority=123
        )]
    ),
    admin_create_user_config=cognito.CfnUserPool.AdminCreateUserConfigProperty(
        allow_admin_create_user_only=False,
        invite_message_template=cognito.CfnUserPool.InviteMessageTemplateProperty(
            email_message="emailMessage",
            email_subject="emailSubject",
            sms_message="smsMessage"
        ),
        unused_account_validity_days=123
    ),
    alias_attributes=["aliasAttributes"],
    auto_verified_attributes=["autoVerifiedAttributes"],
    deletion_protection="deletionProtection",
    device_configuration=cognito.CfnUserPool.DeviceConfigurationProperty(
        challenge_required_on_new_device=False,
        device_only_remembered_on_user_prompt=False
    ),
    email_authentication_message="emailAuthenticationMessage",
    email_authentication_subject="emailAuthenticationSubject",
    email_configuration=cognito.CfnUserPool.EmailConfigurationProperty(
        configuration_set="configurationSet",
        email_sending_account="emailSendingAccount",
        from="from",
        reply_to_email_address="replyToEmailAddress",
        source_arn="sourceArn"
    ),
    email_verification_message="emailVerificationMessage",
    email_verification_subject="emailVerificationSubject",
    enabled_mfas=["enabledMfas"],
    issuer_configuration=cognito.CfnUserPool.IssuerConfigurationProperty(
        type="type"
    ),
    key_configuration=cognito.CfnUserPool.KeyConfigurationProperty(
        key_type="keyType",
        kms_key_arn="kmsKeyArn"
    ),
    lambda_config=cognito.CfnUserPool.LambdaConfigProperty(
        create_auth_challenge="createAuthChallenge",
        custom_email_sender=cognito.CfnUserPool.CustomEmailSenderProperty(
            lambda_arn="lambdaArn",
            lambda_version="lambdaVersion"
        ),
        custom_message="customMessage",
        custom_sms_sender=cognito.CfnUserPool.CustomSMSSenderProperty(
            lambda_arn="lambdaArn",
            lambda_version="lambdaVersion"
        ),
        define_auth_challenge="defineAuthChallenge",
        inbound_federation=cognito.CfnUserPool.InboundFederationProperty(
            lambda_arn="lambdaArn",
            lambda_version="lambdaVersion"
        ),
        kms_key_id="kmsKeyId",
        post_authentication="postAuthentication",
        post_confirmation="postConfirmation",
        pre_authentication="preAuthentication",
        pre_sign_up="preSignUp",
        pre_token_generation="preTokenGeneration",
        pre_token_generation_config=cognito.CfnUserPool.PreTokenGenerationConfigProperty(
            lambda_arn="lambdaArn",
            lambda_version="lambdaVersion"
        ),
        user_migration="userMigration",
        verify_auth_challenge_response="verifyAuthChallengeResponse"
    ),
    mfa_configuration="mfaConfiguration",
    policies=cognito.CfnUserPool.PoliciesProperty(
        password_policy=cognito.CfnUserPool.PasswordPolicyProperty(
            minimum_length=123,
            password_history_size=123,
            require_lowercase=False,
            require_numbers=False,
            require_symbols=False,
            require_uppercase=False,
            temporary_password_validity_days=123
        ),
        sign_in_policy=cognito.CfnUserPool.SignInPolicyProperty(
            allowed_first_auth_factors=["allowedFirstAuthFactors"]
        )
    ),
    schema=[cognito.CfnUserPool.SchemaAttributeProperty(
        attribute_data_type="attributeDataType",
        developer_only_attribute=False,
        mutable=False,
        name="name",
        number_attribute_constraints=cognito.CfnUserPool.NumberAttributeConstraintsProperty(
            max_value="maxValue",
            min_value="minValue"
        ),
        required=False,
        string_attribute_constraints=cognito.CfnUserPool.StringAttributeConstraintsProperty(
            max_length="maxLength",
            min_length="minLength"
        )
    )],
    sms_authentication_message="smsAuthenticationMessage",
    sms_configuration=cognito.CfnUserPool.SmsConfigurationProperty(
        eums_sms=cognito.CfnUserPool.EumsSmsConfigurationProperty(
            caller_arn="callerArn",

            # the properties below are optional
            configuration_set_name="configurationSetName",
            external_id="externalId",
            in_entity_id="inEntityId",
            in_template_id="inTemplateId",
            origination_identity="originationIdentity",
            region="region"
        ),
        external_id="externalId",
        sns_caller_arn="snsCallerArn",
        sns_region="snsRegion"
    ),
    sms_verification_message="smsVerificationMessage",
    user_attribute_update_settings=cognito.CfnUserPool.UserAttributeUpdateSettingsProperty(
        attributes_require_verification_before_update=["attributesRequireVerificationBeforeUpdate"]
    ),
    username_attributes=["usernameAttributes"],
    username_configuration=cognito.CfnUserPool.UsernameConfigurationProperty(
        case_sensitive=False
    ),
    user_pool_add_ons=cognito.CfnUserPool.UserPoolAddOnsProperty(
        advanced_security_additional_flows=cognito.CfnUserPool.AdvancedSecurityAdditionalFlowsProperty(
            custom_auth_mode="customAuthMode"
        ),
        advanced_security_mode="advancedSecurityMode"
    ),
    user_pool_name="userPoolName",
    user_pool_tags=user_pool_tags,
    user_pool_tier="userPoolTier",
    verification_message_template=cognito.CfnUserPool.VerificationMessageTemplateProperty(
        default_email_option="defaultEmailOption",
        email_message="emailMessage",
        email_message_by_link="emailMessageByLink",
        email_subject="emailSubject",
        email_subject_by_link="emailSubjectByLink",
        sms_message="smsMessage"
    ),
    web_authn_factor_configuration="webAuthnFactorConfiguration",
    web_authn_relying_party_id="webAuthnRelyingPartyId",
    web_authn_user_verification="webAuthnUserVerification"
)
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.*;

Object userPoolTags;

CfnUserPool cfnUserPool = CfnUserPool.Builder.create(this, "MyCfnUserPool")
        .accountRecoverySetting(AccountRecoverySettingProperty.builder()
                .recoveryMechanisms(List.of(RecoveryOptionProperty.builder()
                        .name("name")
                        .priority(123)
                        .build()))
                .build())
        .adminCreateUserConfig(AdminCreateUserConfigProperty.builder()
                .allowAdminCreateUserOnly(false)
                .inviteMessageTemplate(InviteMessageTemplateProperty.builder()
                        .emailMessage("emailMessage")
                        .emailSubject("emailSubject")
                        .smsMessage("smsMessage")
                        .build())
                .unusedAccountValidityDays(123)
                .build())
        .aliasAttributes(List.of("aliasAttributes"))
        .autoVerifiedAttributes(List.of("autoVerifiedAttributes"))
        .deletionProtection("deletionProtection")
        .deviceConfiguration(DeviceConfigurationProperty.builder()
                .challengeRequiredOnNewDevice(false)
                .deviceOnlyRememberedOnUserPrompt(false)
                .build())
        .emailAuthenticationMessage("emailAuthenticationMessage")
        .emailAuthenticationSubject("emailAuthenticationSubject")
        .emailConfiguration(EmailConfigurationProperty.builder()
                .configurationSet("configurationSet")
                .emailSendingAccount("emailSendingAccount")
                .from("from")
                .replyToEmailAddress("replyToEmailAddress")
                .sourceArn("sourceArn")
                .build())
        .emailVerificationMessage("emailVerificationMessage")
        .emailVerificationSubject("emailVerificationSubject")
        .enabledMfas(List.of("enabledMfas"))
        .issuerConfiguration(IssuerConfigurationProperty.builder()
                .type("type")
                .build())
        .keyConfiguration(KeyConfigurationProperty.builder()
                .keyType("keyType")
                .kmsKeyArn("kmsKeyArn")
                .build())
        .lambdaConfig(LambdaConfigProperty.builder()
                .createAuthChallenge("createAuthChallenge")
                .customEmailSender(CustomEmailSenderProperty.builder()
                        .lambdaArn("lambdaArn")
                        .lambdaVersion("lambdaVersion")
                        .build())
                .customMessage("customMessage")
                .customSmsSender(CustomSMSSenderProperty.builder()
                        .lambdaArn("lambdaArn")
                        .lambdaVersion("lambdaVersion")
                        .build())
                .defineAuthChallenge("defineAuthChallenge")
                .inboundFederation(InboundFederationProperty.builder()
                        .lambdaArn("lambdaArn")
                        .lambdaVersion("lambdaVersion")
                        .build())
                .kmsKeyId("kmsKeyId")
                .postAuthentication("postAuthentication")
                .postConfirmation("postConfirmation")
                .preAuthentication("preAuthentication")
                .preSignUp("preSignUp")
                .preTokenGeneration("preTokenGeneration")
                .preTokenGenerationConfig(PreTokenGenerationConfigProperty.builder()
                        .lambdaArn("lambdaArn")
                        .lambdaVersion("lambdaVersion")
                        .build())
                .userMigration("userMigration")
                .verifyAuthChallengeResponse("verifyAuthChallengeResponse")
                .build())
        .mfaConfiguration("mfaConfiguration")
        .policies(PoliciesProperty.builder()
                .passwordPolicy(PasswordPolicyProperty.builder()
                        .minimumLength(123)
                        .passwordHistorySize(123)
                        .requireLowercase(false)
                        .requireNumbers(false)
                        .requireSymbols(false)
                        .requireUppercase(false)
                        .temporaryPasswordValidityDays(123)
                        .build())
                .signInPolicy(SignInPolicyProperty.builder()
                        .allowedFirstAuthFactors(List.of("allowedFirstAuthFactors"))
                        .build())
                .build())
        .schema(List.of(SchemaAttributeProperty.builder()
                .attributeDataType("attributeDataType")
                .developerOnlyAttribute(false)
                .mutable(false)
                .name("name")
                .numberAttributeConstraints(NumberAttributeConstraintsProperty.builder()
                        .maxValue("maxValue")
                        .minValue("minValue")
                        .build())
                .required(false)
                .stringAttributeConstraints(StringAttributeConstraintsProperty.builder()
                        .maxLength("maxLength")
                        .minLength("minLength")
                        .build())
                .build()))
        .smsAuthenticationMessage("smsAuthenticationMessage")
        .smsConfiguration(SmsConfigurationProperty.builder()
                .eumsSms(EumsSmsConfigurationProperty.builder()
                        .callerArn("callerArn")

                        // the properties below are optional
                        .configurationSetName("configurationSetName")
                        .externalId("externalId")
                        .inEntityId("inEntityId")
                        .inTemplateId("inTemplateId")
                        .originationIdentity("originationIdentity")
                        .region("region")
                        .build())
                .externalId("externalId")
                .snsCallerArn("snsCallerArn")
                .snsRegion("snsRegion")
                .build())
        .smsVerificationMessage("smsVerificationMessage")
        .userAttributeUpdateSettings(UserAttributeUpdateSettingsProperty.builder()
                .attributesRequireVerificationBeforeUpdate(List.of("attributesRequireVerificationBeforeUpdate"))
                .build())
        .usernameAttributes(List.of("usernameAttributes"))
        .usernameConfiguration(UsernameConfigurationProperty.builder()
                .caseSensitive(false)
                .build())
        .userPoolAddOns(UserPoolAddOnsProperty.builder()
                .advancedSecurityAdditionalFlows(AdvancedSecurityAdditionalFlowsProperty.builder()
                        .customAuthMode("customAuthMode")
                        .build())
                .advancedSecurityMode("advancedSecurityMode")
                .build())
        .userPoolName("userPoolName")
        .userPoolTags(userPoolTags)
        .userPoolTier("userPoolTier")
        .verificationMessageTemplate(VerificationMessageTemplateProperty.builder()
                .defaultEmailOption("defaultEmailOption")
                .emailMessage("emailMessage")
                .emailMessageByLink("emailMessageByLink")
                .emailSubject("emailSubject")
                .emailSubjectByLink("emailSubjectByLink")
                .smsMessage("smsMessage")
                .build())
        .webAuthnFactorConfiguration("webAuthnFactorConfiguration")
        .webAuthnRelyingPartyId("webAuthnRelyingPartyId")
        .webAuthnUserVerification("webAuthnUserVerification")
        .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 userPoolTags;

var cfnUserPool = new CfnUserPool(this, "MyCfnUserPool", new CfnUserPoolProps {
    AccountRecoverySetting = new AccountRecoverySettingProperty {
        RecoveryMechanisms = new [] { new RecoveryOptionProperty {
            Name = "name",
            Priority = 123
        } }
    },
    AdminCreateUserConfig = new AdminCreateUserConfigProperty {
        AllowAdminCreateUserOnly = false,
        InviteMessageTemplate = new InviteMessageTemplateProperty {
            EmailMessage = "emailMessage",
            EmailSubject = "emailSubject",
            SmsMessage = "smsMessage"
        },
        UnusedAccountValidityDays = 123
    },
    AliasAttributes = new [] { "aliasAttributes" },
    AutoVerifiedAttributes = new [] { "autoVerifiedAttributes" },
    DeletionProtection = "deletionProtection",
    DeviceConfiguration = new DeviceConfigurationProperty {
        ChallengeRequiredOnNewDevice = false,
        DeviceOnlyRememberedOnUserPrompt = false
    },
    EmailAuthenticationMessage = "emailAuthenticationMessage",
    EmailAuthenticationSubject = "emailAuthenticationSubject",
    EmailConfiguration = new EmailConfigurationProperty {
        ConfigurationSet = "configurationSet",
        EmailSendingAccount = "emailSendingAccount",
        From = "from",
        ReplyToEmailAddress = "replyToEmailAddress",
        SourceArn = "sourceArn"
    },
    EmailVerificationMessage = "emailVerificationMessage",
    EmailVerificationSubject = "emailVerificationSubject",
    EnabledMfas = new [] { "enabledMfas" },
    IssuerConfiguration = new IssuerConfigurationProperty {
        Type = "type"
    },
    KeyConfiguration = new KeyConfigurationProperty {
        KeyType = "keyType",
        KmsKeyArn = "kmsKeyArn"
    },
    LambdaConfig = new LambdaConfigProperty {
        CreateAuthChallenge = "createAuthChallenge",
        CustomEmailSender = new CustomEmailSenderProperty {
            LambdaArn = "lambdaArn",
            LambdaVersion = "lambdaVersion"
        },
        CustomMessage = "customMessage",
        CustomSmsSender = new CustomSMSSenderProperty {
            LambdaArn = "lambdaArn",
            LambdaVersion = "lambdaVersion"
        },
        DefineAuthChallenge = "defineAuthChallenge",
        InboundFederation = new InboundFederationProperty {
            LambdaArn = "lambdaArn",
            LambdaVersion = "lambdaVersion"
        },
        KmsKeyId = "kmsKeyId",
        PostAuthentication = "postAuthentication",
        PostConfirmation = "postConfirmation",
        PreAuthentication = "preAuthentication",
        PreSignUp = "preSignUp",
        PreTokenGeneration = "preTokenGeneration",
        PreTokenGenerationConfig = new PreTokenGenerationConfigProperty {
            LambdaArn = "lambdaArn",
            LambdaVersion = "lambdaVersion"
        },
        UserMigration = "userMigration",
        VerifyAuthChallengeResponse = "verifyAuthChallengeResponse"
    },
    MfaConfiguration = "mfaConfiguration",
    Policies = new PoliciesProperty {
        PasswordPolicy = new PasswordPolicyProperty {
            MinimumLength = 123,
            PasswordHistorySize = 123,
            RequireLowercase = false,
            RequireNumbers = false,
            RequireSymbols = false,
            RequireUppercase = false,
            TemporaryPasswordValidityDays = 123
        },
        SignInPolicy = new SignInPolicyProperty {
            AllowedFirstAuthFactors = new [] { "allowedFirstAuthFactors" }
        }
    },
    Schema = new [] { new SchemaAttributeProperty {
        AttributeDataType = "attributeDataType",
        DeveloperOnlyAttribute = false,
        Mutable = false,
        Name = "name",
        NumberAttributeConstraints = new NumberAttributeConstraintsProperty {
            MaxValue = "maxValue",
            MinValue = "minValue"
        },
        Required = false,
        StringAttributeConstraints = new StringAttributeConstraintsProperty {
            MaxLength = "maxLength",
            MinLength = "minLength"
        }
    } },
    SmsAuthenticationMessage = "smsAuthenticationMessage",
    SmsConfiguration = new SmsConfigurationProperty {
        EumsSms = new EumsSmsConfigurationProperty {
            CallerArn = "callerArn",

            // the properties below are optional
            ConfigurationSetName = "configurationSetName",
            ExternalId = "externalId",
            InEntityId = "inEntityId",
            InTemplateId = "inTemplateId",
            OriginationIdentity = "originationIdentity",
            Region = "region"
        },
        ExternalId = "externalId",
        SnsCallerArn = "snsCallerArn",
        SnsRegion = "snsRegion"
    },
    SmsVerificationMessage = "smsVerificationMessage",
    UserAttributeUpdateSettings = new UserAttributeUpdateSettingsProperty {
        AttributesRequireVerificationBeforeUpdate = new [] { "attributesRequireVerificationBeforeUpdate" }
    },
    UsernameAttributes = new [] { "usernameAttributes" },
    UsernameConfiguration = new UsernameConfigurationProperty {
        CaseSensitive = false
    },
    UserPoolAddOns = new UserPoolAddOnsProperty {
        AdvancedSecurityAdditionalFlows = new AdvancedSecurityAdditionalFlowsProperty {
            CustomAuthMode = "customAuthMode"
        },
        AdvancedSecurityMode = "advancedSecurityMode"
    },
    UserPoolName = "userPoolName",
    UserPoolTags = userPoolTags,
    UserPoolTier = "userPoolTier",
    VerificationMessageTemplate = new VerificationMessageTemplateProperty {
        DefaultEmailOption = "defaultEmailOption",
        EmailMessage = "emailMessage",
        EmailMessageByLink = "emailMessageByLink",
        EmailSubject = "emailSubject",
        EmailSubjectByLink = "emailSubjectByLink",
        SmsMessage = "smsMessage"
    },
    WebAuthnFactorConfiguration = "webAuthnFactorConfiguration",
    WebAuthnRelyingPartyId = "webAuthnRelyingPartyId",
    WebAuthnUserVerification = "webAuthnUserVerification"
});
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"

var userPoolTags interface{}

cfnUserPool := awscdk.Aws_cognito.NewCfnUserPool(this, jsii.String("MyCfnUserPool"), &CfnUserPoolProps{
	AccountRecoverySetting: &AccountRecoverySettingProperty{
		RecoveryMechanisms: []interface{}{
			&RecoveryOptionProperty{
				Name: jsii.String("name"),
				Priority: jsii.Number(123),
			},
		},
	},
	AdminCreateUserConfig: &AdminCreateUserConfigProperty{
		AllowAdminCreateUserOnly: jsii.Boolean(false),
		InviteMessageTemplate: &InviteMessageTemplateProperty{
			EmailMessage: jsii.String("emailMessage"),
			EmailSubject: jsii.String("emailSubject"),
			SmsMessage: jsii.String("smsMessage"),
		},
		UnusedAccountValidityDays: jsii.Number(123),
	},
	AliasAttributes: []*string{
		jsii.String("aliasAttributes"),
	},
	AutoVerifiedAttributes: []*string{
		jsii.String("autoVerifiedAttributes"),
	},
	DeletionProtection: jsii.String("deletionProtection"),
	DeviceConfiguration: &DeviceConfigurationProperty{
		ChallengeRequiredOnNewDevice: jsii.Boolean(false),
		DeviceOnlyRememberedOnUserPrompt: jsii.Boolean(false),
	},
	EmailAuthenticationMessage: jsii.String("emailAuthenticationMessage"),
	EmailAuthenticationSubject: jsii.String("emailAuthenticationSubject"),
	EmailConfiguration: &EmailConfigurationProperty{
		ConfigurationSet: jsii.String("configurationSet"),
		EmailSendingAccount: jsii.String("emailSendingAccount"),
		From: jsii.String("from"),
		ReplyToEmailAddress: jsii.String("replyToEmailAddress"),
		SourceArn: jsii.String("sourceArn"),
	},
	EmailVerificationMessage: jsii.String("emailVerificationMessage"),
	EmailVerificationSubject: jsii.String("emailVerificationSubject"),
	EnabledMfas: []*string{
		jsii.String("enabledMfas"),
	},
	IssuerConfiguration: &IssuerConfigurationProperty{
		Type: jsii.String("type"),
	},
	KeyConfiguration: &KeyConfigurationProperty{
		KeyType: jsii.String("keyType"),
		KmsKeyArn: jsii.String("kmsKeyArn"),
	},
	LambdaConfig: &LambdaConfigProperty{
		CreateAuthChallenge: jsii.String("createAuthChallenge"),
		CustomEmailSender: &CustomEmailSenderProperty{
			LambdaArn: jsii.String("lambdaArn"),
			LambdaVersion: jsii.String("lambdaVersion"),
		},
		CustomMessage: jsii.String("customMessage"),
		CustomSmsSender: &CustomSMSSenderProperty{
			LambdaArn: jsii.String("lambdaArn"),
			LambdaVersion: jsii.String("lambdaVersion"),
		},
		DefineAuthChallenge: jsii.String("defineAuthChallenge"),
		InboundFederation: &InboundFederationProperty{
			LambdaArn: jsii.String("lambdaArn"),
			LambdaVersion: jsii.String("lambdaVersion"),
		},
		KmsKeyId: jsii.String("kmsKeyId"),
		PostAuthentication: jsii.String("postAuthentication"),
		PostConfirmation: jsii.String("postConfirmation"),
		PreAuthentication: jsii.String("preAuthentication"),
		PreSignUp: jsii.String("preSignUp"),
		PreTokenGeneration: jsii.String("preTokenGeneration"),
		PreTokenGenerationConfig: &PreTokenGenerationConfigProperty{
			LambdaArn: jsii.String("lambdaArn"),
			LambdaVersion: jsii.String("lambdaVersion"),
		},
		UserMigration: jsii.String("userMigration"),
		VerifyAuthChallengeResponse: jsii.String("verifyAuthChallengeResponse"),
	},
	MfaConfiguration: jsii.String("mfaConfiguration"),
	Policies: &PoliciesProperty{
		PasswordPolicy: &PasswordPolicyProperty{
			MinimumLength: jsii.Number(123),
			PasswordHistorySize: jsii.Number(123),
			RequireLowercase: jsii.Boolean(false),
			RequireNumbers: jsii.Boolean(false),
			RequireSymbols: jsii.Boolean(false),
			RequireUppercase: jsii.Boolean(false),
			TemporaryPasswordValidityDays: jsii.Number(123),
		},
		SignInPolicy: &SignInPolicyProperty{
			AllowedFirstAuthFactors: []*string{
				jsii.String("allowedFirstAuthFactors"),
			},
		},
	},
	Schema: []interface{}{
		&SchemaAttributeProperty{
			AttributeDataType: jsii.String("attributeDataType"),
			DeveloperOnlyAttribute: jsii.Boolean(false),
			Mutable: jsii.Boolean(false),
			Name: jsii.String("name"),
			NumberAttributeConstraints: &NumberAttributeConstraintsProperty{
				MaxValue: jsii.String("maxValue"),
				MinValue: jsii.String("minValue"),
			},
			Required: jsii.Boolean(false),
			StringAttributeConstraints: &StringAttributeConstraintsProperty{
				MaxLength: jsii.String("maxLength"),
				MinLength: jsii.String("minLength"),
			},
		},
	},
	SmsAuthenticationMessage: jsii.String("smsAuthenticationMessage"),
	SmsConfiguration: &SmsConfigurationProperty{
		EumsSms: &EumsSmsConfigurationProperty{
			CallerArn: jsii.String("callerArn"),

			// the properties below are optional
			ConfigurationSetName: jsii.String("configurationSetName"),
			ExternalId: jsii.String("externalId"),
			InEntityId: jsii.String("inEntityId"),
			InTemplateId: jsii.String("inTemplateId"),
			OriginationIdentity: jsii.String("originationIdentity"),
			Region: jsii.String("region"),
		},
		ExternalId: jsii.String("externalId"),
		SnsCallerArn: jsii.String("snsCallerArn"),
		SnsRegion: jsii.String("snsRegion"),
	},
	SmsVerificationMessage: jsii.String("smsVerificationMessage"),
	UserAttributeUpdateSettings: &UserAttributeUpdateSettingsProperty{
		AttributesRequireVerificationBeforeUpdate: []*string{
			jsii.String("attributesRequireVerificationBeforeUpdate"),
		},
	},
	UsernameAttributes: []*string{
		jsii.String("usernameAttributes"),
	},
	UsernameConfiguration: &UsernameConfigurationProperty{
		CaseSensitive: jsii.Boolean(false),
	},
	UserPoolAddOns: &UserPoolAddOnsProperty{
		AdvancedSecurityAdditionalFlows: &AdvancedSecurityAdditionalFlowsProperty{
			CustomAuthMode: jsii.String("customAuthMode"),
		},
		AdvancedSecurityMode: jsii.String("advancedSecurityMode"),
	},
	UserPoolName: jsii.String("userPoolName"),
	UserPoolTags: userPoolTags,
	UserPoolTier: jsii.String("userPoolTier"),
	VerificationMessageTemplate: &VerificationMessageTemplateProperty{
		DefaultEmailOption: jsii.String("defaultEmailOption"),
		EmailMessage: jsii.String("emailMessage"),
		EmailMessageByLink: jsii.String("emailMessageByLink"),
		EmailSubject: jsii.String("emailSubject"),
		EmailSubjectByLink: jsii.String("emailSubjectByLink"),
		SmsMessage: jsii.String("smsMessage"),
	},
	WebAuthnFactorConfiguration: jsii.String("webAuthnFactorConfiguration"),
	WebAuthnRelyingPartyId: jsii.String("webAuthnRelyingPartyId"),
	WebAuthnUserVerification: jsii.String("webAuthnUserVerification"),
})

Initializer ​

ts
new CfnUserPool(scope: Construct, id: string, props?: CfnUserPoolProps)
python
CfnUserPool(scope: Construct, id: str, props: typing.Optional[CfnUserPoolProps] = None)
java
new CfnUserPool(Construct scope, String id, CfnUserPoolProps props)
csharp
new CfnUserPool(Construct scope, string id, CfnUserPoolProps? props = null)
go
NewCfnUserPool(Scope Construct, Id *string, Props CfnUserPoolProps)

Construct Props ​

accountRecoverySettingoptionalIResolvable | CfnUserPool.AccountRecoverySettingPropertyaccount_recovery_settingoptionaltyping.Union[IResolvable, AccountRecoverySettingProperty]accountRecoverySettingoptionalIResolvableAccountRecoverySettingoptionalIResolvableAccountRecoverySettingoptionalinterface{}#
The available verified method a user can use to recover their password when they call `ForgotPassword` .
notes

You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.

adminCreateUserConfigoptionalIResolvable | CfnUserPool.AdminCreateUserConfigPropertyadmin_create_user_configoptionaltyping.Union[IResolvable, AdminCreateUserConfigProperty]adminCreateUserConfigoptionalIResolvableAdminCreateUserConfigoptionalIResolvableAdminCreateUserConfigoptionalinterface{}#
The settings for administrator creation of users in a user pool.

Contains settings for allowing user sign-up, customizing invitation messages to new users, and the amount of time before temporary passwords expire.

aliasAttributesoptionalstring[]alias_attributesoptionaltyping.List[str]aliasAttributesoptionalList<String>AliasAttributesoptionalstring[]AliasAttributesoptional*[]*string#
Attributes supported as an alias for this user pool.

For more information about alias attributes, see Customizing sign-in attributes .

autoVerifiedAttributesoptionalstring[]auto_verified_attributesoptionaltyping.List[str]autoVerifiedAttributesoptionalList<String>AutoVerifiedAttributesoptionalstring[]AutoVerifiedAttributesoptional*[]*string#
The attributes that you want your user pool to automatically verify.

For more information, see Verifying contact information at sign-up .

deletionProtectionoptionalstringdeletion_protectionoptionalstrdeletionProtectionoptionalStringDeletionProtectionoptionalstringDeletionProtectionoptional*string#
When active, `DeletionProtection` prevents accidental deletion of your user pool.
notes

Before you can delete a user pool that you have protected against deletion, you must deactivate this feature.

When you try to delete a protected user pool in a DeleteUserPool API request, Amazon Cognito returns an InvalidParameterException error. To delete a protected user pool, send a new DeleteUserPool request after you deactivate deletion protection in an UpdateUserPool API request.

deviceConfigurationoptionalIResolvable | CfnUserPool.DeviceConfigurationPropertydevice_configurationoptionaltyping.Union[IResolvable, DeviceConfigurationProperty]deviceConfigurationoptionalIResolvableDeviceConfigurationoptionalIResolvableDeviceConfigurationoptionalinterface{}#
The device-remembering configuration for a user pool.
notes

Device remembering or device tracking is a "Remember me on this device" option for user pools that perform authentication with the device key of a trusted device in the back end, instead of a user-provided MFA code. For more information about device authentication, see Working with user devices in your user pool . A null value indicates that you have deactivated device remembering in your user pool.

When you provide a value for any DeviceConfiguration field, you activate the Amazon Cognito device-remembering feature. For more information, see Working with devices .

emailAuthenticationMessageoptionalstringemail_authentication_messageoptionalstremailAuthenticationMessageoptionalStringEmailAuthenticationMessageoptionalstringEmailAuthenticationMessageoptional*string#
emailAuthenticationSubjectoptionalstringemail_authentication_subjectoptionalstremailAuthenticationSubjectoptionalStringEmailAuthenticationSubjectoptionalstringEmailAuthenticationSubjectoptional*string#
emailConfigurationoptionalIResolvable | CfnUserPool.EmailConfigurationPropertyemail_configurationoptionaltyping.Union[IResolvable, EmailConfigurationProperty]emailConfigurationoptionalIResolvableEmailConfigurationoptionalIResolvableEmailConfigurationoptionalinterface{}#
The email configuration of your user pool.

The email configuration type sets your preferred sending method, AWS Region, and sender for messages from your user pool.

emailVerificationMessageoptionalstringemail_verification_messageoptionalstremailVerificationMessageoptionalStringEmailVerificationMessageoptionalstringEmailVerificationMessageoptional*string#
This parameter is no longer used.
emailVerificationSubjectoptionalstringemail_verification_subjectoptionalstremailVerificationSubjectoptionalStringEmailVerificationSubjectoptionalstringEmailVerificationSubjectoptional*string#
This parameter is no longer used.
enabledMfasoptionalstring[]enabled_mfasoptionaltyping.List[str]enabledMfasoptionalList<String>EnabledMfasoptionalstring[]EnabledMfasoptional*[]*string#
Set enabled MFA options on a specified user pool.
notes

To disable all MFAs after it has been enabled, set MfaConfiguration to OFF and remove EnabledMfas. MFAs can only be all disabled if MfaConfiguration is OFF . After you enable SMS_MFA , you can only disable it by setting MfaConfiguration to OFF . Can be one of the following values:

  • SMS_MFA - Enables MFA with SMS for the user pool. To select this option, you must also provide values for SmsConfiguration .
  • SOFTWARE_TOKEN_MFA - Enables software token MFA for the user pool.
  • EMAIL_OTP - Enables MFA with email for the user pool. To select this option, you must provide values for EmailConfiguration and within those, set EmailSendingAccount to DEVELOPER .

Allowed values: SMS_MFA | SOFTWARE_TOKEN_MFA | EMAIL_OTP

issuerConfigurationoptionalIResolvable | CfnUserPool.IssuerConfigurationPropertyissuer_configurationoptionaltyping.Union[IResolvable, IssuerConfigurationProperty]issuerConfigurationoptionalIResolvableIssuerConfigurationoptionalIResolvableIssuerConfigurationoptionalinterface{}#
keyConfigurationoptionalIResolvable | CfnUserPool.KeyConfigurationPropertykey_configurationoptionaltyping.Union[IResolvable, KeyConfigurationProperty]keyConfigurationoptionalIResolvableKeyConfigurationoptionalIResolvableKeyConfigurationoptionalinterface{}#
lambdaConfigoptionalIResolvable | CfnUserPool.LambdaConfigPropertylambda_configoptionaltyping.Union[IResolvable, LambdaConfigProperty]lambdaConfigoptionalIResolvableLambdaConfigoptionalIResolvableLambdaConfigoptionalinterface{}#
A collection of user pool Lambda triggers.

Amazon Cognito invokes triggers at several possible stages of authentication operations. Triggers can modify the outcome of the operations that invoked them.

mfaConfigurationoptionalstringmfa_configurationoptionalstrmfaConfigurationoptionalStringMfaConfigurationoptionalstringMfaConfigurationoptional*string#
Displays the state of multi-factor authentication (MFA) as on, off, or optional.
notes

When ON , all users must set up MFA before they can sign in. When OPTIONAL , your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose OPTIONAL .

When MfaConfiguration is OPTIONAL , managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.

policiesoptionalIResolvable | CfnUserPool.PoliciesPropertypoliciesoptionaltyping.Union[IResolvable, PoliciesProperty]policiesoptionalIResolvablePoliciesoptionalIResolvablePoliciesoptionalinterface{}#
A list of user pool policies.

Contains the policy that sets password-complexity requirements.

schemaoptionalIResolvable | IResolvable | CfnUserPool.SchemaAttributeProperty[]schemaoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SchemaAttributeProperty]]]schemaoptionalIResolvableSchemaoptionalIResolvableSchemaoptionalinterface{}#
An array of attributes for the new user pool.
notes

You can add custom attributes and modify the properties of default attributes. The specifications in this parameter set the required attributes in your user pool. For more information, see Working with user attributes .

smsAuthenticationMessageoptionalstringsms_authentication_messageoptionalstrsmsAuthenticationMessageoptionalStringSmsAuthenticationMessageoptionalstringSmsAuthenticationMessageoptional*string#
The contents of the SMS authentication message.
smsConfigurationoptionalIResolvable | CfnUserPool.SmsConfigurationPropertysms_configurationoptionaltyping.Union[IResolvable, SmsConfigurationProperty]smsConfigurationoptionalIResolvableSmsConfigurationoptionalIResolvableSmsConfigurationoptionalinterface{}#
The settings for your Amazon Cognito user pool to send SMS messages with Amazon Simple Notification Service.
notes

To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account . For more information see SMS message settings .

smsVerificationMessageoptionalstringsms_verification_messageoptionalstrsmsVerificationMessageoptionalStringSmsVerificationMessageoptionalstringSmsVerificationMessageoptional*string#
This parameter is no longer used.
userAttributeUpdateSettingsoptionalIResolvable | CfnUserPool.UserAttributeUpdateSettingsPropertyuser_attribute_update_settingsoptionaltyping.Union[IResolvable, UserAttributeUpdateSettingsProperty]userAttributeUpdateSettingsoptionalIResolvableUserAttributeUpdateSettingsoptionalIResolvableUserAttributeUpdateSettingsoptionalinterface{}#
The settings for updates to user attributes.
notes

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 .

usernameAttributesoptionalstring[]username_attributesoptionaltyping.List[str]usernameAttributesoptionalList<String>UsernameAttributesoptionalstring[]UsernameAttributesoptional*[]*string#
Specifies whether a user can use an email address or phone number as a username when they sign up.
usernameConfigurationoptionalIResolvable | CfnUserPool.UsernameConfigurationPropertyusername_configurationoptionaltyping.Union[IResolvable, UsernameConfigurationProperty]usernameConfigurationoptionalIResolvableUsernameConfigurationoptionalIResolvableUsernameConfigurationoptionalinterface{}#
Sets the case sensitivity option for sign-in usernames.
notes

When CaseSensitive is false (case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username , USERNAME , or UserName , or for email, email@example.com or EMaiL@eXamplE.Com . For most use cases, set case sensitivity to false as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.

When CaseSensitive is true (case sensitive), Amazon Cognito interprets USERNAME and UserName as distinct users.

This configuration is immutable after you set it.

userPoolAddOnsoptionalIResolvable | CfnUserPool.UserPoolAddOnsPropertyuser_pool_add_onsoptionaltyping.Union[IResolvable, UserPoolAddOnsProperty]userPoolAddOnsoptionalIResolvableUserPoolAddOnsoptionalIResolvableUserPoolAddOnsoptionalinterface{}#
Contains settings for activation of threat protection, including the operating mode and additional authentication types.
notes

To log user security information but take no action, set to AUDIT . To configure automatic security responses to potentially unwanted traffic to your user pool, set to ENFORCED .

For more information, see Adding advanced security to a user pool . To activate this setting, your user pool must be on the Plus tier .

userPoolNameoptionalstringuser_pool_nameoptionalstruserPoolNameoptionalStringUserPoolNameoptionalstringUserPoolNameoptional*string#
A friendly name for your user pool.
userPoolTagsoptionalanyuser_pool_tagsoptionalAnyuserPoolTagsoptionalObjectUserPoolTagsoptionalobjectUserPoolTagsoptionalinterface{}#
The tag keys and values to assign to the user pool.

A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.

userPoolTieroptionalstringuser_pool_tieroptionalstruserPoolTieroptionalStringUserPoolTieroptionalstringUserPoolTieroptional*string#
The user pool [feature plan](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html) , or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to `ESSENTIALS` .
verificationMessageTemplateoptionalIResolvable | CfnUserPool.VerificationMessageTemplatePropertyverification_message_templateoptionaltyping.Union[IResolvable, VerificationMessageTemplateProperty]verificationMessageTemplateoptionalIResolvableVerificationMessageTemplateoptionalIResolvableVerificationMessageTemplateoptionalinterface{}#
The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.
notes

Set the email message type that corresponds to your DefaultEmailOption selection. For CONFIRM_WITH_LINK , specify an EmailMessageByLink and leave EmailMessage blank. For CONFIRM_WITH_CODE , specify an EmailMessage and leave EmailMessageByLink blank. When you supply both parameters with either choice, Amazon Cognito returns an error.

webAuthnFactorConfigurationoptionalstringweb_authn_factor_configurationoptionalstrwebAuthnFactorConfigurationoptionalStringWebAuthnFactorConfigurationoptionalstringWebAuthnFactorConfigurationoptional*string#
webAuthnRelyingPartyIdoptionalstringweb_authn_relying_party_idoptionalstrwebAuthnRelyingPartyIdoptionalStringWebAuthnRelyingPartyIdoptionalstringWebAuthnRelyingPartyIdoptional*string#
Sets or displays the authentication domain, typically your user pool domain, that passkey providers must use as a relying party (RP) in their configuration.
notes

Under the following conditions, the passkey relying party ID must be the fully-qualified domain name of your custom domain:

  • The user pool is configured for passkey authentication.
  • The user pool has a custom domain, whether or not it also has a prefix domain.
  • Your application performs authentication with managed login or the classic hosted UI.
webAuthnUserVerificationoptionalstringweb_authn_user_verificationoptionalstrwebAuthnUserVerificationoptionalStringWebAuthnUserVerificationoptionalstringWebAuthnUserVerificationoptional*string#
When `required` , users can only register and sign in users with passkeys that are capable of [user verification](https://docs.aws.amazon.com/https://www.w3.org/TR/webauthn-2/#enum-userVerificationRequirement) . When `preferred` , your user pool doesn't require the use of authenticators with user verification but encourages it.

Properties ​

accountRecoverySettingmay be undefinedIResolvable | CfnUserPool.AccountRecoverySettingPropertyaccount_recovery_settingmay be undefinedtyping.Union[IResolvable, AccountRecoverySettingProperty]accountRecoverySettingmay be undefinedIResolvableAccountRecoverySettingmay be undefinedIResolvableAccountRecoverySettingmay be undefinedinterface{}#
The available verified method a user can use to recover their password when they call `ForgotPassword` .
adminCreateUserConfigmay be undefinedIResolvable | CfnUserPool.AdminCreateUserConfigPropertyadmin_create_user_configmay be undefinedtyping.Union[IResolvable, AdminCreateUserConfigProperty]adminCreateUserConfigmay be undefinedIResolvableAdminCreateUserConfigmay be undefinedIResolvableAdminCreateUserConfigmay be undefinedinterface{}#
The settings for administrator creation of users in a user pool.
aliasAttributesmay be undefinedstring[]alias_attributesmay be undefinedtyping.List[str]aliasAttributesmay be undefinedList<String>AliasAttributesmay be undefinedstring[]AliasAttributesmay be undefined*[]*string#
Attributes supported as an alias for this user pool.
attrArnstringattr_arnstrattrArnStringAttrArnstringAttrArn*string#
The Amazon Resource Name (ARN) of the user pool, such as `arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341` .
attrProviderNamestringattr_provider_namestrattrProviderNameStringAttrProviderNamestringAttrProviderName*string#
A friendly name for the IdP.
attrProviderUrlstringattr_provider_urlstrattrProviderUrlStringAttrProviderUrlstringAttrProviderUrl*string#
The URL of the provider of the Amazon Cognito user pool, specified as a `String` .
attrUserPoolIdstringattr_user_pool_idstrattrUserPoolIdStringAttrUserPoolIdstringAttrUserPoolId*string#
The ID of the user pool.
autoVerifiedAttributesmay be undefinedstring[]auto_verified_attributesmay be undefinedtyping.List[str]autoVerifiedAttributesmay be undefinedList<String>AutoVerifiedAttributesmay be undefinedstring[]AutoVerifiedAttributesmay be undefined*[]*string#
The attributes that you want your user pool to automatically verify.
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#
deletionProtectionmay be undefinedstringdeletion_protectionmay be undefinedstrdeletionProtectionmay be undefinedStringDeletionProtectionmay be undefinedstringDeletionProtectionmay be undefined*string#
When active, `DeletionProtection` prevents accidental deletion of your user pool.
deviceConfigurationmay be undefinedIResolvable | CfnUserPool.DeviceConfigurationPropertydevice_configurationmay be undefinedtyping.Union[IResolvable, DeviceConfigurationProperty]deviceConfigurationmay be undefinedIResolvableDeviceConfigurationmay be undefinedIResolvableDeviceConfigurationmay be undefinedinterface{}#
The device-remembering configuration for a user pool.
emailAuthenticationMessagemay be undefinedstringemail_authentication_messagemay be undefinedstremailAuthenticationMessagemay be undefinedStringEmailAuthenticationMessagemay be undefinedstringEmailAuthenticationMessagemay be undefined*string#
emailAuthenticationSubjectmay be undefinedstringemail_authentication_subjectmay be undefinedstremailAuthenticationSubjectmay be undefinedStringEmailAuthenticationSubjectmay be undefinedstringEmailAuthenticationSubjectmay be undefined*string#
emailConfigurationmay be undefinedIResolvable | CfnUserPool.EmailConfigurationPropertyemail_configurationmay be undefinedtyping.Union[IResolvable, EmailConfigurationProperty]emailConfigurationmay be undefinedIResolvableEmailConfigurationmay be undefinedIResolvableEmailConfigurationmay be undefinedinterface{}#
The email configuration of your user pool.
emailVerificationMessagemay be undefinedstringemail_verification_messagemay be undefinedstremailVerificationMessagemay be undefinedStringEmailVerificationMessagemay be undefinedstringEmailVerificationMessagemay be undefined*string#
This parameter is no longer used.
emailVerificationSubjectmay be undefinedstringemail_verification_subjectmay be undefinedstremailVerificationSubjectmay be undefinedStringEmailVerificationSubjectmay be undefinedstringEmailVerificationSubjectmay be undefined*string#
This parameter is no longer used.
enabledMfasmay be undefinedstring[]enabled_mfasmay be undefinedtyping.List[str]enabledMfasmay be undefinedList<String>EnabledMfasmay be undefinedstring[]EnabledMfasmay be undefined*[]*string#
Set enabled MFA options on a specified user pool.
issuerConfigurationmay be undefinedIResolvable | CfnUserPool.IssuerConfigurationPropertyissuer_configurationmay be undefinedtyping.Union[IResolvable, IssuerConfigurationProperty]issuerConfigurationmay be undefinedIResolvableIssuerConfigurationmay be undefinedIResolvableIssuerConfigurationmay be undefinedinterface{}#
keyConfigurationmay be undefinedIResolvable | CfnUserPool.KeyConfigurationPropertykey_configurationmay be undefinedtyping.Union[IResolvable, KeyConfigurationProperty]keyConfigurationmay be undefinedIResolvableKeyConfigurationmay be undefinedIResolvableKeyConfigurationmay be undefinedinterface{}#
lambdaConfigmay be undefinedIResolvable | CfnUserPool.LambdaConfigPropertylambda_configmay be undefinedtyping.Union[IResolvable, LambdaConfigProperty]lambdaConfigmay be undefinedIResolvableLambdaConfigmay be undefinedIResolvableLambdaConfigmay be undefinedinterface{}#
A collection of user pool Lambda triggers.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string#
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

mfaConfigurationmay be undefinedstringmfa_configurationmay be undefinedstrmfaConfigurationmay be undefinedStringMfaConfigurationmay be undefinedstringMfaConfigurationmay be undefined*string#
Displays the state of multi-factor authentication (MFA) as on, off, or optional.
nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
policiesmay be undefinedIResolvable | CfnUserPool.PoliciesPropertypoliciesmay be undefinedtyping.Union[IResolvable, PoliciesProperty]policiesmay be undefinedIResolvablePoliciesmay be undefinedIResolvablePoliciesmay be undefinedinterface{}#
A list of user pool policies.
refstringrefstrrefStringRefstringRef*string#
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

schemamay be undefinedIResolvable | IResolvable | CfnUserPool.SchemaAttributeProperty[]schemamay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SchemaAttributeProperty]]]schemamay be undefinedIResolvableSchemamay be undefinedIResolvableSchemamay be undefinedinterface{}#
An array of attributes for the new user pool.
smsAuthenticationMessagemay be undefinedstringsms_authentication_messagemay be undefinedstrsmsAuthenticationMessagemay be undefinedStringSmsAuthenticationMessagemay be undefinedstringSmsAuthenticationMessagemay be undefined*string#
The contents of the SMS authentication message.
smsConfigurationmay be undefinedIResolvable | CfnUserPool.SmsConfigurationPropertysms_configurationmay be undefinedtyping.Union[IResolvable, SmsConfigurationProperty]smsConfigurationmay be undefinedIResolvableSmsConfigurationmay be undefinedIResolvableSmsConfigurationmay be undefinedinterface{}#
The settings for your Amazon Cognito user pool to send SMS messages with Amazon Simple Notification Service.
smsVerificationMessagemay be undefinedstringsms_verification_messagemay be undefinedstrsmsVerificationMessagemay be undefinedStringSmsVerificationMessagemay be undefinedstringSmsVerificationMessagemay be undefined*string#
This parameter is no longer used.
stackStackstackStackstackStackStackStackStackStack#
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Tag Manager which manages the tags for this resource.
userAttributeUpdateSettingsmay be undefinedIResolvable | CfnUserPool.UserAttributeUpdateSettingsPropertyuser_attribute_update_settingsmay be undefinedtyping.Union[IResolvable, UserAttributeUpdateSettingsProperty]userAttributeUpdateSettingsmay be undefinedIResolvableUserAttributeUpdateSettingsmay be undefinedIResolvableUserAttributeUpdateSettingsmay be undefinedinterface{}#
The settings for updates to user attributes.
usernameAttributesmay be undefinedstring[]username_attributesmay be undefinedtyping.List[str]usernameAttributesmay be undefinedList<String>UsernameAttributesmay be undefinedstring[]UsernameAttributesmay be undefined*[]*string#
Specifies whether a user can use an email address or phone number as a username when they sign up.
usernameConfigurationmay be undefinedIResolvable | CfnUserPool.UsernameConfigurationPropertyusername_configurationmay be undefinedtyping.Union[IResolvable, UsernameConfigurationProperty]usernameConfigurationmay be undefinedIResolvableUsernameConfigurationmay be undefinedIResolvableUsernameConfigurationmay be undefinedinterface{}#
Sets the case sensitivity option for sign-in usernames.
userPoolAddOnsmay be undefinedIResolvable | CfnUserPool.UserPoolAddOnsPropertyuser_pool_add_onsmay be undefinedtyping.Union[IResolvable, UserPoolAddOnsProperty]userPoolAddOnsmay be undefinedIResolvableUserPoolAddOnsmay be undefinedIResolvableUserPoolAddOnsmay be undefinedinterface{}#
Contains settings for activation of threat protection, including the operating mode and additional authentication types.
userPoolNamemay be undefinedstringuser_pool_namemay be undefinedstruserPoolNamemay be undefinedStringUserPoolNamemay be undefinedstringUserPoolNamemay be undefined*string#
A friendly name for your user pool.
A reference to a UserPool resource.
userPoolTagsRawanyuser_pool_tags_rawAnyuserPoolTagsRawObjectUserPoolTagsRawobjectUserPoolTagsRawinterface{}#
The tag keys and values to assign to the user pool.
userPoolTiermay be undefinedstringuser_pool_tiermay be undefinedstruserPoolTiermay be undefinedStringUserPoolTiermay be undefinedstringUserPoolTiermay be undefined*string#
The user pool [feature plan](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html) , or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to `ESSENTIALS` .
verificationMessageTemplatemay be undefinedIResolvable | CfnUserPool.VerificationMessageTemplatePropertyverification_message_templatemay be undefinedtyping.Union[IResolvable, VerificationMessageTemplateProperty]verificationMessageTemplatemay be undefinedIResolvableVerificationMessageTemplatemay be undefinedIResolvableVerificationMessageTemplatemay be undefinedinterface{}#
The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.
webAuthnFactorConfigurationmay be undefinedstringweb_authn_factor_configurationmay be undefinedstrwebAuthnFactorConfigurationmay be undefinedStringWebAuthnFactorConfigurationmay be undefinedstringWebAuthnFactorConfigurationmay be undefined*string#
webAuthnRelyingPartyIdmay be undefinedstringweb_authn_relying_party_idmay be undefinedstrwebAuthnRelyingPartyIdmay be undefinedStringWebAuthnRelyingPartyIdmay be undefinedstringWebAuthnRelyingPartyIdmay be undefined*string#
Sets or displays the authentication domain, typically your user pool domain, that passkey providers must use as a relying party (RP) in their configuration.
webAuthnUserVerificationmay be undefinedstringweb_authn_user_verificationmay be undefinedstrwebAuthnUserVerificationmay be undefinedStringWebAuthnUserVerificationmay be undefinedstringWebAuthnUserVerificationmay be undefined*string#
When `required` , users can only register and sign in users with passkeys that are capable of [user verification](https://docs.aws.amazon.com/https://www.w3.org/TR/webauthn-2/#enum-userVerificationRequirement) . When `preferred` , your user pool doesn't require the use of authenticators with user verification but encourages it.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForUserPool(resource: IUserPoolRef): string@staticmethod def arn_for_user_pool(resource: IUserPoolRef) -> strpublic static String arnForUserPool(IUserPoolRef resource)public static string ArnForUserPool(IUserPoolRef resource)func ArnForUserPool(Resource IUserPoolRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
fromUserPoolArn(scope: Construct, id: string, arn: string): IUserPoolRef@staticmethod def from_user_pool_arn(scope: Construct, id: str, arn: str) -> IUserPoolRefpublic static IUserPoolRef fromUserPoolArn(Construct scope, String id, String arn)public static IUserPoolRef FromUserPoolArn(Construct scope, string id, string arn)func FromUserPoolArn(Scope Construct, Id *string, Arn *string) IUserPoolRefstatic#
Creates a new IUserPoolRef from an ARN.
fromUserPoolId(scope: Construct, id: string, userPoolId: string): IUserPoolRef@staticmethod def from_user_pool_id(scope: Construct, id: str, user_pool_id: str) -> IUserPoolRefpublic static IUserPoolRef fromUserPoolId(Construct scope, String id, String userPoolId)public static IUserPoolRef FromUserPoolId(Construct scope, string id, string userPoolId)func FromUserPoolId(Scope Construct, Id *string, UserPoolId *string) IUserPoolRefstatic#
Creates a new IUserPoolRef from a userPoolId.
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isCfnUserPool(x: any): boolean@staticmethod def is_cfn_user_pool(x: Any) -> boolpublic static Boolean isCfnUserPool(Object x)public static bool IsCfnUserPool(object x)func IsCfnUserPool(X interface{}) *boolstatic#
Checks whether the given object is a CfnUserPool.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.