Class CfnUserPoolProps
Properties for defining a CfnUserPool
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnUserPoolProps : Object, ICfnUserPoolProps
Syntax (vb)
Public Class CfnUserPoolProps
Inherits Object
Implements ICfnUserPoolProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
ExampleMetadata: fixture=_generated
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",
PreTokenGenerationConfig = new PreTokenGenerationConfigProperty {
LambdaArn = "lambdaArn",
LambdaVersion = "lambdaVersion"
},
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"
}
};
Synopsis
Constructors
CfnUserPoolProps() |
Properties
AccountRecoverySetting | Use this setting to define which verified available method a user can use to recover their password when they call |
AdminCreateUserConfig | The configuration for creating a new user profile. |
AliasAttributes | Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username . |
AutoVerifiedAttributes | The attributes to be auto-verified. |
DeletionProtection | When active, |
DeviceConfiguration | The device-remembering configuration for a user pool. |
EmailConfiguration | The email configuration of your user pool. |
EmailVerificationMessage | This parameter is no longer used. |
EmailVerificationSubject | This parameter is no longer used. |
EnabledMfas | Enables MFA on a specified user pool. |
LambdaConfig | The Lambda trigger configuration information for the new user pool. |
MfaConfiguration | The multi-factor authentication (MFA) configuration. Valid values include:. |
Policies | The policy associated with a user pool. |
Schema | The schema attributes for the new user pool. These attributes can be standard or custom attributes. |
SmsAuthenticationMessage | A string representing the SMS authentication message. |
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. |
SmsVerificationMessage | This parameter is no longer used. |
UserAttributeUpdateSettings | The settings for updates to user attributes. |
UsernameAttributes | Determines whether email addresses or phone numbers can be specified as user names when a user signs up. |
UsernameConfiguration | You can choose to set case sensitivity on the username input for the selected sign-in option. |
UserPoolAddOns | User pool add-ons. |
UserPoolName | A string used to name the user pool. |
UserPoolTags | The tag keys and values to assign to the user pool. |
VerificationMessageTemplate | The template for the verification message that the user sees when the app requests permission to access the user's information. |
Constructors
CfnUserPoolProps()
public CfnUserPoolProps()
Properties
AccountRecoverySetting
Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword
.
public object AccountRecoverySetting { get; set; }
Property Value
System.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.
AdminCreateUserConfig
The configuration for creating a new user profile.
public object AdminCreateUserConfig { get; set; }
Property Value
System.Object
Remarks
AliasAttributes
Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username .
public string[] AliasAttributes { get; set; }
Property Value
System.String[]
Remarks
This user pool property cannot be updated.
AutoVerifiedAttributes
The attributes to be auto-verified.
public string[] AutoVerifiedAttributes { get; set; }
Property Value
System.String[]
Remarks
Possible values: email , phone_number .
DeletionProtection
When active, DeletionProtection
prevents accidental deletion of your user pool.
public string DeletionProtection { get; set; }
Property Value
System.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.
DeviceConfiguration
The device-remembering configuration for a user pool.
public object DeviceConfiguration { get; set; }
Property Value
System.Object
Remarks
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.
EmailConfiguration
The email configuration of your user pool.
public object EmailConfiguration { get; set; }
Property Value
System.Object
Remarks
The email configuration type sets your preferred sending method, AWS Region, and sender for messages from your user pool.
EmailVerificationMessage
This parameter is no longer used.
public string EmailVerificationMessage { get; set; }
Property Value
System.String
Remarks
EmailVerificationSubject
This parameter is no longer used.
public string EmailVerificationSubject { get; set; }
Property Value
System.String
Remarks
EnabledMfas
Enables MFA on a specified user pool.
public string[] EnabledMfas { get; set; }
Property Value
System.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
LambdaConfig
The Lambda trigger configuration information for the new user pool.
public object LambdaConfig { get; set; }
Property Value
System.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 .
MfaConfiguration
The multi-factor authentication (MFA) configuration. Valid values include:.
public string MfaConfiguration { get; set; }
Property Value
System.String
Remarks
Policies
The policy associated with a user pool.
public object Policies { get; set; }
Property Value
System.Object
Remarks
Schema
The schema attributes for the new user pool. These attributes can be standard or custom attributes.
public object Schema { get; set; }
Property Value
System.Object
Remarks
During a user pool update, you can add new schema attributes but you cannot modify or delete an existing schema attribute.
SmsAuthenticationMessage
A string representing the SMS authentication message.
public string SmsAuthenticationMessage { get; set; }
Property Value
System.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.
public object SmsConfiguration { get; set; }
Property Value
System.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 .
SmsVerificationMessage
This parameter is no longer used.
public string SmsVerificationMessage { get; set; }
Property Value
System.String
Remarks
UserAttributeUpdateSettings
The settings for updates to user attributes.
public object UserAttributeUpdateSettings { get; set; }
Property Value
System.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 .
UsernameAttributes
Determines whether email addresses or phone numbers can be specified as user names when a user signs up.
public string[] UsernameAttributes { get; set; }
Property Value
System.String[]
Remarks
Possible values: phone_number
or email
.
This user pool property cannot be updated.
UsernameConfiguration
You can choose to set case sensitivity on the username input for the selected sign-in option.
public object UsernameConfiguration { get; set; }
Property Value
System.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.
UserPoolAddOns
User pool add-ons.
public object UserPoolAddOns { get; set; }
Property Value
System.Object
Remarks
Contains settings for activation of advanced security features. To log user security information but take no action, set to AUDIT
. To configure automatic security responses to risky traffic to your user pool, set to ENFORCED
.
For more information, see Adding advanced security to a user pool .
UserPoolName
A string used to name the user pool.
public string UserPoolName { get; set; }
Property Value
System.String
Remarks
UserPoolTags
The tag keys and values to assign to the user pool.
public object UserPoolTags { get; set; }
Property Value
System.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.
VerificationMessageTemplate
The template for the verification message that the user sees when the app requests permission to access the user's information.
public object VerificationMessageTemplate { get; set; }
Property Value
System.Object