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
// 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',
});
# 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"
)
// 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();
// 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"
});
// 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
new CfnUserPool(scope: Construct, id: string, props?: CfnUserPoolProps)
CfnUserPool(scope: Construct, id: str, props: typing.Optional[CfnUserPoolProps] = None)
new CfnUserPool(Construct scope, String id, CfnUserPoolProps props)
new CfnUserPool(Construct scope, string id, CfnUserPoolProps? props = null)
NewCfnUserPool(Scope Construct, Id *string, Props CfnUserPoolProps)
Construct Props
accountRecoverySettingoptionalIResolvable | CfnUserPool.AccountRecoverySettingPropertyaccount_recovery_settingoptionaltyping.Union[IResolvable, AccountRecoverySettingProperty]accountRecoverySettingoptionalIResolvableAccountRecoverySettingoptionalIResolvableAccountRecoverySettingoptionalinterface{}#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{}#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#For more information about alias attributes, see Customizing sign-in attributes .
autoVerifiedAttributesoptionalstring[]auto_verified_attributesoptionaltyping.List[str]autoVerifiedAttributesoptionalList<String>AutoVerifiedAttributesoptionalstring[]AutoVerifiedAttributesoptional*[]*string#For more information, see Verifying contact information at sign-up .
deletionProtectionoptionalstringdeletion_protectionoptionalstrdeletionProtectionoptionalStringDeletionProtectionoptionalstringDeletionProtectionoptional*string#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{}#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
DeviceConfigurationfield, 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 type sets your preferred sending method, AWS Region, and sender for messages from your user pool.
emailVerificationMessageoptionalstringemail_verification_messageoptionalstremailVerificationMessageoptionalStringEmailVerificationMessageoptionalstringEmailVerificationMessageoptional*string#emailVerificationSubjectoptionalstringemail_verification_subjectoptionalstremailVerificationSubjectoptionalStringEmailVerificationSubjectoptionalstringEmailVerificationSubjectoptional*string#enabledMfasoptionalstring[]enabled_mfasoptionaltyping.List[str]enabledMfasoptionalList<String>EnabledMfasoptionalstring[]EnabledMfasoptional*[]*string#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 forSmsConfiguration.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 forEmailConfigurationand within those, setEmailSendingAccounttoDEVELOPER.
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{}#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#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{}#Contains the policy that sets password-complexity requirements.
schemaoptionalIResolvable | IResolvable | CfnUserPool.SchemaAttributeProperty[]schemaoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SchemaAttributeProperty]]]schemaoptionalIResolvableSchemaoptionalIResolvableSchemaoptionalinterface{}#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#smsConfigurationoptionalIResolvable | CfnUserPool.SmsConfigurationPropertysms_configurationoptionaltyping.Union[IResolvable, SmsConfigurationProperty]smsConfigurationoptionalIResolvableSmsConfigurationoptionalIResolvableSmsConfigurationoptionalinterface{}#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#userAttributeUpdateSettingsoptionalIResolvable | CfnUserPool.UserAttributeUpdateSettingsPropertyuser_attribute_update_settingsoptionaltyping.Union[IResolvable, UserAttributeUpdateSettingsProperty]userAttributeUpdateSettingsoptionalIResolvableUserAttributeUpdateSettingsoptionalIResolvableUserAttributeUpdateSettingsoptionalinterface{}#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#usernameConfigurationoptionalIResolvable | CfnUserPool.UsernameConfigurationPropertyusername_configurationoptionaltyping.Union[IResolvable, UsernameConfigurationProperty]usernameConfigurationoptionalIResolvableUsernameConfigurationoptionalIResolvableUsernameConfigurationoptionalinterface{}#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{}#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#userPoolTagsoptionalanyuser_pool_tagsoptionalAnyuserPoolTagsoptionalObjectUserPoolTagsoptionalobjectUserPoolTagsoptionalinterface{}#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#verificationMessageTemplateoptionalIResolvable | CfnUserPool.VerificationMessageTemplatePropertyverification_message_templateoptionaltyping.Union[IResolvable, VerificationMessageTemplateProperty]verificationMessageTemplateoptionalIResolvableVerificationMessageTemplateoptionalIResolvableVerificationMessageTemplateoptionalinterface{}#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#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#Properties
accountRecoverySettingmay be undefinedIResolvable | CfnUserPool.AccountRecoverySettingPropertyaccount_recovery_settingmay be undefinedtyping.Union[IResolvable, AccountRecoverySettingProperty]accountRecoverySettingmay be undefinedIResolvableAccountRecoverySettingmay be undefinedIResolvableAccountRecoverySettingmay be undefinedinterface{}#adminCreateUserConfigmay be undefinedIResolvable | CfnUserPool.AdminCreateUserConfigPropertyadmin_create_user_configmay be undefinedtyping.Union[IResolvable, AdminCreateUserConfigProperty]adminCreateUserConfigmay be undefinedIResolvableAdminCreateUserConfigmay be undefinedIResolvableAdminCreateUserConfigmay be undefinedinterface{}#aliasAttributesmay be undefinedstring[]alias_attributesmay be undefinedtyping.List[str]aliasAttributesmay be undefinedList<String>AliasAttributesmay be undefinedstring[]AliasAttributesmay be undefined*[]*string#attrProviderNamestringattr_provider_namestrattrProviderNameStringAttrProviderNamestringAttrProviderName*string#attrProviderUrlstringattr_provider_urlstrattrProviderUrlStringAttrProviderUrlstringAttrProviderUrl*string#attrUserPoolIdstringattr_user_pool_idstrattrUserPoolIdStringAttrUserPoolIdstringAttrUserPoolId*string#autoVerifiedAttributesmay be undefinedstring[]auto_verified_attributesmay be undefinedtyping.List[str]autoVerifiedAttributesmay be undefinedList<String>AutoVerifiedAttributesmay be undefinedstring[]AutoVerifiedAttributesmay be undefined*[]*string#CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#deletionProtectionmay be undefinedstringdeletion_protectionmay be undefinedstrdeletionProtectionmay be undefinedStringDeletionProtectionmay be undefinedstringDeletionProtectionmay be undefined*string#deviceConfigurationmay be undefinedIResolvable | CfnUserPool.DeviceConfigurationPropertydevice_configurationmay be undefinedtyping.Union[IResolvable, DeviceConfigurationProperty]deviceConfigurationmay be undefinedIResolvableDeviceConfigurationmay be undefinedIResolvableDeviceConfigurationmay be undefinedinterface{}#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{}#emailVerificationMessagemay be undefinedstringemail_verification_messagemay be undefinedstremailVerificationMessagemay be undefinedStringEmailVerificationMessagemay be undefinedstringEmailVerificationMessagemay be undefined*string#emailVerificationSubjectmay be undefinedstringemail_verification_subjectmay be undefinedstremailVerificationSubjectmay be undefinedStringEmailVerificationSubjectmay be undefinedstringEmailVerificationSubjectmay be undefined*string#enabledMfasmay be undefinedstring[]enabled_mfasmay be undefinedtyping.List[str]enabledMfasmay be undefinedList<String>EnabledMfasmay be undefinedstring[]EnabledMfasmay be undefined*[]*string#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{}#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#policiesmay be undefinedIResolvable | CfnUserPool.PoliciesPropertypoliciesmay be undefinedtyping.Union[IResolvable, PoliciesProperty]policiesmay be undefinedIResolvablePoliciesmay be undefinedIResolvablePoliciesmay be undefinedinterface{}#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{}#smsAuthenticationMessagemay be undefinedstringsms_authentication_messagemay be undefinedstrsmsAuthenticationMessagemay be undefinedStringSmsAuthenticationMessagemay be undefinedstringSmsAuthenticationMessagemay be undefined*string#smsConfigurationmay be undefinedIResolvable | CfnUserPool.SmsConfigurationPropertysms_configurationmay be undefinedtyping.Union[IResolvable, SmsConfigurationProperty]smsConfigurationmay be undefinedIResolvableSmsConfigurationmay be undefinedIResolvableSmsConfigurationmay be undefinedinterface{}#smsVerificationMessagemay be undefinedstringsms_verification_messagemay be undefinedstrsmsVerificationMessagemay be undefinedStringSmsVerificationMessagemay be undefinedstringSmsVerificationMessagemay be undefined*string#CfnElements must be defined within a stack scope (directly or indirectly).
userAttributeUpdateSettingsmay be undefinedIResolvable | CfnUserPool.UserAttributeUpdateSettingsPropertyuser_attribute_update_settingsmay be undefinedtyping.Union[IResolvable, UserAttributeUpdateSettingsProperty]userAttributeUpdateSettingsmay be undefinedIResolvableUserAttributeUpdateSettingsmay be undefinedIResolvableUserAttributeUpdateSettingsmay be undefinedinterface{}#usernameAttributesmay be undefinedstring[]username_attributesmay be undefinedtyping.List[str]usernameAttributesmay be undefinedList<String>UsernameAttributesmay be undefinedstring[]UsernameAttributesmay be undefined*[]*string#usernameConfigurationmay be undefinedIResolvable | CfnUserPool.UsernameConfigurationPropertyusername_configurationmay be undefinedtyping.Union[IResolvable, UsernameConfigurationProperty]usernameConfigurationmay be undefinedIResolvableUsernameConfigurationmay be undefinedIResolvableUsernameConfigurationmay be undefinedinterface{}#userPoolAddOnsmay be undefinedIResolvable | CfnUserPool.UserPoolAddOnsPropertyuser_pool_add_onsmay be undefinedtyping.Union[IResolvable, UserPoolAddOnsProperty]userPoolAddOnsmay be undefinedIResolvableUserPoolAddOnsmay be undefinedIResolvableUserPoolAddOnsmay be undefinedinterface{}#userPoolNamemay be undefinedstringuser_pool_namemay be undefinedstruserPoolNamemay be undefinedStringUserPoolNamemay be undefinedstringUserPoolNamemay be undefined*string#userPoolRefUserPoolReferenceuser_pool_refUserPoolReferenceuserPoolRefUserPoolReferenceUserPoolRefUserPoolReferenceUserPoolRefUserPoolReference#userPoolTagsRawanyuser_pool_tags_rawAnyuserPoolTagsRawObjectUserPoolTagsRawobjectUserPoolTagsRawinterface{}#userPoolTiermay be undefinedstringuser_pool_tiermay be undefinedstruserPoolTiermay be undefinedStringUserPoolTiermay be undefinedstringUserPoolTiermay be undefined*string#verificationMessageTemplatemay be undefinedIResolvable | CfnUserPool.VerificationMessageTemplatePropertyverification_message_templatemay be undefinedtyping.Union[IResolvable, VerificationMessageTemplateProperty]verificationMessageTemplatemay be undefinedIResolvableVerificationMessageTemplatemay be undefinedIResolvableVerificationMessageTemplatemay be undefinedinterface{}#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#webAuthnUserVerificationmay be undefinedstringweb_authn_user_verificationmay be undefinedstrwebAuthnUserVerificationmay be undefinedStringWebAuthnUserVerificationmay be undefinedstringWebAuthnUserVerificationmay be undefined*string#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)#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#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#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{})#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{})#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,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"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)#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{})#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)#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)#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)#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#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#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#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{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#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#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#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#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#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{}#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)#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#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)#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)#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
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#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.