Table of Contents

Interface ICfnUserPoolProps

Namespace
Amazon.CDK.AWS.Cognito
Assembly
Amazon.CDK.AWS.Cognito.dll

Properties for defining a CfnUserPool.

public interface ICfnUserPoolProps

Examples

// 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 cfnUserPoolProps = 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
                 },
                 EmailConfiguration = new EmailConfigurationProperty {
                     ConfigurationSet = "configurationSet",
                     EmailSendingAccount = "emailSendingAccount",
                     From = "from",
                     ReplyToEmailAddress = "replyToEmailAddress",
                     SourceArn = "sourceArn"
                 },
                 EmailVerificationMessage = "emailVerificationMessage",
                 EmailVerificationSubject = "emailVerificationSubject",
                 EnabledMfas = new [] { "enabledMfas" },
                 LambdaConfig = new LambdaConfigProperty {
                     CreateAuthChallenge = "createAuthChallenge",
                     CustomEmailSender = new CustomEmailSenderProperty {
                         LambdaArn = "lambdaArn",
                         LambdaVersion = "lambdaVersion"
                     },
                     CustomMessage = "customMessage",
                     CustomSmsSender = new CustomSMSSenderProperty {
                         LambdaArn = "lambdaArn",
                         LambdaVersion = "lambdaVersion"
                     },
                     DefineAuthChallenge = "defineAuthChallenge",
                     KmsKeyId = "kmsKeyId",
                     PostAuthentication = "postAuthentication",
                     PostConfirmation = "postConfirmation",
                     PreAuthentication = "preAuthentication",
                     PreSignUp = "preSignUp",
                     PreTokenGeneration = "preTokenGeneration",
                     UserMigration = "userMigration",
                     VerifyAuthChallengeResponse = "verifyAuthChallengeResponse"
                 },
                 MfaConfiguration = "mfaConfiguration",
                 Policies = new PoliciesProperty {
                     PasswordPolicy = new PasswordPolicyProperty {
                         MinimumLength = 123,
                         RequireLowercase = false,
                         RequireNumbers = false,
                         RequireSymbols = false,
                         RequireUppercase = false,
                         TemporaryPasswordValidityDays = 123
                     }
                 },
                 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 {
                     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 {
                     AdvancedSecurityMode = "advancedSecurityMode"
                 },
                 UserPoolName = "userPoolName",
                 UserPoolTags = userPoolTags,
                 VerificationMessageTemplate = new VerificationMessageTemplateProperty {
                     DefaultEmailOption = "defaultEmailOption",
                     EmailMessage = "emailMessage",
                     EmailMessageByLink = "emailMessageByLink",
                     EmailSubject = "emailSubject",
                     EmailSubjectByLink = "emailSubjectByLink",
                     SmsMessage = "smsMessage"
                 }
             };

Remarks

Properties

AccountRecoverySetting

Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword .

object? AccountRecoverySetting { get; }

Property Value

object

Remarks

It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-accountrecoverysetting

AdminCreateUserConfig

The configuration for creating a new user profile.

object? AdminCreateUserConfig { get; }

Property Value

object

Remarks

AliasAttributes

Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username .

string[]? AliasAttributes { get; }

Property Value

string[]

Remarks

AutoVerifiedAttributes

The attributes to be auto-verified.

string[]? AutoVerifiedAttributes { get; }

Property Value

string[]

Remarks

DeletionProtection

When active, DeletionProtection prevents accidental deletion of your user pool.

string? DeletionProtection { get; }

Property Value

string

Remarks

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.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-deletionprotection

DeviceConfiguration

The device-remembering configuration for a user pool.

object? DeviceConfiguration { get; }

Property Value

object

Remarks

A null value indicates that you have deactivated device remembering in your user pool.

When you provide a value for any <code>DeviceConfiguration</code> field, you activate the Amazon Cognito device-remembering feature.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-deviceconfiguration

EmailConfiguration

The email configuration of your user pool.

object? EmailConfiguration { get; }

Property Value

object

Remarks

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

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-emailconfiguration

EmailVerificationMessage

This parameter is no longer used.

string? EmailVerificationMessage { get; }

Property Value

string

Remarks

EmailVerificationSubject

This parameter is no longer used.

string? EmailVerificationSubject { get; }

Property Value

string

Remarks

EnabledMfas

Enables MFA on a specified user pool.

string[]? EnabledMfas { get; }

Property Value

string[]

Remarks

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. Once SMS_MFA is enabled, SMS_MFA can only be disabled by setting MfaConfiguration to “OFF”. Can be one of the following values:

    Allowed values: SMS_MFA | SOFTWARE_TOKEN_MFA

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-enabledmfas

    LambdaConfig

    The Lambda trigger configuration information for the new user pool.

    object? LambdaConfig { get; }

    Property Value

    object

    Remarks

    In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you must make an extra call to add permission for these event sources to invoke your Lambda function.
    

    For more information on using the Lambda API to add permission, see AddPermission .

    For adding permission using the AWS CLI , see add-permission .

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-lambdaconfig

    MfaConfiguration

    The multi-factor authentication (MFA) configuration. Valid values include:.

    string? MfaConfiguration { get; }

    Property Value

    string

    Remarks

    Policies

    The policy associated with a user pool.

    object? Policies { get; }

    Property Value

    object

    Remarks

    Schema

    The schema attributes for the new user pool. These attributes can be standard or custom attributes.

    object? Schema { get; }

    Property Value

    object

    Remarks

    During a user pool update, you can add new schema attributes but you cannot modify or delete an existing schema attribute.
    

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-schema

    SmsAuthenticationMessage

    A string representing the SMS authentication message.

    string? SmsAuthenticationMessage { get; }

    Property Value

    string

    Remarks

    SmsConfiguration

    The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service.

    object? SmsConfiguration { get; }

    Property Value

    object

    Remarks

    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 .

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-smsconfiguration

    SmsVerificationMessage

    This parameter is no longer used.

    string? SmsVerificationMessage { get; }

    Property Value

    string

    Remarks

    UserAttributeUpdateSettings

    The settings for updates to user attributes.

    object? UserAttributeUpdateSettings { get; }

    Property Value

    object

    Remarks

    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 .

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-userattributeupdatesettings

    UserPoolAddOns

    Enables advanced security risk detection.

    object? UserPoolAddOns { get; }

    Property Value

    object

    Remarks

    UserPoolName

    A string used to name the user pool.

    string? UserPoolName { get; }

    Property Value

    string

    Remarks

    UserPoolTags

    The tag keys and values to assign to the user pool.

    object? UserPoolTags { get; }

    Property Value

    object

    Remarks

    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.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-userpooltags

    UsernameAttributes

    Determines whether email addresses or phone numbers can be specified as user names when a user signs up.

    string[]? UsernameAttributes { get; }

    Property Value

    string[]

    Remarks

    Possible values: phone_number or email .

    This user pool property cannot be updated.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-usernameattributes

    UsernameConfiguration

    You can choose to set case sensitivity on the username input for the selected sign-in option.

    object? UsernameConfiguration { get; }

    Property Value

    object

    Remarks

    For example, when this is set to False , users will be able to sign in using either "username" or "Username". This configuration is immutable once it has been set.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-usernameconfiguration

    VerificationMessageTemplate

    The template for the verification message that the user sees when the app requests permission to access the user's information.

    object? VerificationMessageTemplate { get; }

    Property Value

    object

    Remarks