Class CfnUserPool
The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.
Inherited Members
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnUserPool : CfnResource, IInspectable, IUserPoolRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Syntax (vb)
Public Class CfnUserPool Inherits CfnResource Implements IInspectable, IUserPoolRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
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 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" },
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 {
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"
},
WebAuthnRelyingPartyId = "webAuthnRelyingPartyId",
WebAuthnUserVerification = "webAuthnUserVerification"
});
Synopsis
Constructors
| CfnUserPool(Construct, string, ICfnUserPoolProps?) | Create a new |
Properties
| AccountRecoverySetting | The available verified method a user can use to recover their password when they call |
| AdminCreateUserConfig | The settings for administrator creation of users in a user pool. |
| AliasAttributes | Attributes supported as an alias for this user pool. |
| AttrArn | The Amazon Resource Name (ARN) of the user pool, such as |
| AttrProviderName | A friendly name for the IdP. |
| AttrProviderUrl | The URL of the provider of the Amazon Cognito user pool, specified as a |
| AttrUserPoolId | The ID of the user pool. |
| AutoVerifiedAttributes | The attributes that you want your user pool to automatically verify. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | The |
| DeletionProtection | When active, |
| DeviceConfiguration | The device-remembering configuration for a user pool. |
| EmailAuthenticationMessage | The |
| EmailAuthenticationSubject | The |
| EmailConfiguration | The email configuration of your user pool. |
| EmailVerificationMessage | This parameter is no longer used. |
| EmailVerificationSubject | This parameter is no longer used. |
| EnabledMfas | Set enabled MFA options on a specified user pool. |
| LambdaConfig | A collection of user pool Lambda triggers. |
| MfaConfiguration | Displays the state of multi-factor authentication (MFA) as on, off, or optional. |
| Policies | A list of user pool policies. |
| Schema | An array of attributes for the new user pool. |
| SmsAuthenticationMessage | The contents of the SMS authentication message. |
| SmsConfiguration | The settings for your Amazon Cognito user pool to send SMS messages with Amazon Simple Notification Service. |
| SmsVerificationMessage | This parameter is no longer used. |
| Tags | Tag Manager which manages the tags for this resource. |
| UserAttributeUpdateSettings | The settings for updates to user attributes. |
| UserPoolAddOns | Contains settings for activation of threat protection, including the operating mode and additional authentication types. |
| UserPoolName | A friendly name for your user pool. |
| UserPoolRef | A reference to a UserPool resource. |
| UserPoolTagsRaw | The tag keys and values to assign to the user pool. |
| UserPoolTier | The user pool feature plan , or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to |
| UsernameAttributes | Specifies whether a user can use an email address or phone number as a username when they sign up. |
| UsernameConfiguration | Sets the case sensitivity option for sign-in usernames. |
| VerificationMessageTemplate | The template for the verification message that your user pool delivers to users who set an email address or phone number attribute. |
| WebAuthnRelyingPartyId | Sets or displays the authentication domain, typically your user pool domain, that passkey providers must use as a relying party (RP) in their configuration. |
| WebAuthnUserVerification | When |
Methods
| ArnForUserPool(IUserPoolRef) | The |
| FromUserPoolArn(Construct, string, string) | Creates a new IUserPoolRef from an ARN. |
| FromUserPoolId(Construct, string, string) | Creates a new IUserPoolRef from a userPoolId. |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnUserPool(object) | Checks whether the given object is a CfnUserPool. |
| RenderProperties(IDictionary<string, object>) | The |
Constructors
CfnUserPool(Construct, string, ICfnUserPoolProps?)
Create a new AWS::Cognito::UserPool.
public CfnUserPool(Construct scope, string id, ICfnUserPoolProps? props = null)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnUserPoolProps
Resource properties.
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
Properties
AccountRecoverySetting
The available verified method a user can use to recover their password when they call ForgotPassword .
public virtual object? AccountRecoverySetting { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IAccountRecoverySettingProperty
AdminCreateUserConfig
The settings for administrator creation of users in a user pool.
public virtual object? AdminCreateUserConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IAdminCreateUserConfigProperty
AliasAttributes
Attributes supported as an alias for this user pool.
public virtual string[]? AliasAttributes { get; set; }
Property Value
string[]
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
AttrArn
The Amazon Resource Name (ARN) of the user pool, such as arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341 .
public virtual string AttrArn { get; }
Property Value
Remarks
CloudformationAttribute: Arn
AttrProviderName
A friendly name for the IdP.
public virtual string AttrProviderName { get; }
Property Value
Remarks
CloudformationAttribute: ProviderName
AttrProviderUrl
The URL of the provider of the Amazon Cognito user pool, specified as a String .
public virtual string AttrProviderUrl { get; }
Property Value
Remarks
CloudformationAttribute: ProviderURL
AttrUserPoolId
The ID of the user pool.
public virtual string AttrUserPoolId { get; }
Property Value
Remarks
CloudformationAttribute: UserPoolId
AutoVerifiedAttributes
The attributes that you want your user pool to automatically verify.
public virtual string[]? AutoVerifiedAttributes { get; set; }
Property Value
string[]
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
CfnProperties
The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
DeletionProtection
When active, DeletionProtection prevents accidental deletion of your user pool.
public virtual string? DeletionProtection { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
DeviceConfiguration
The device-remembering configuration for a user pool.
public virtual object? DeviceConfiguration { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IDeviceConfigurationProperty
EmailAuthenticationMessage
The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.
public virtual string? EmailAuthenticationMessage { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
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 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" },
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 {
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"
},
WebAuthnRelyingPartyId = "webAuthnRelyingPartyId",
WebAuthnUserVerification = "webAuthnUserVerification"
});
EmailAuthenticationSubject
The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.
public virtual string? EmailAuthenticationSubject { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
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 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" },
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 {
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"
},
WebAuthnRelyingPartyId = "webAuthnRelyingPartyId",
WebAuthnUserVerification = "webAuthnUserVerification"
});
EmailConfiguration
The email configuration of your user pool.
public virtual object? EmailConfiguration { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IEmailConfigurationProperty
EmailVerificationMessage
This parameter is no longer used.
public virtual string? EmailVerificationMessage { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
EmailVerificationSubject
This parameter is no longer used.
public virtual string? EmailVerificationSubject { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
EnabledMfas
Set enabled MFA options on a specified user pool.
public virtual string[]? EnabledMfas { get; set; }
Property Value
string[]
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
LambdaConfig
A collection of user pool Lambda triggers.
public virtual object? LambdaConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.ILambdaConfigProperty
MfaConfiguration
Displays the state of multi-factor authentication (MFA) as on, off, or optional.
public virtual string? MfaConfiguration { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
Policies
A list of user pool policies.
public virtual object? Policies { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IPoliciesProperty
Schema
An array of attributes for the new user pool.
public virtual object? Schema { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnUserPool.ISchemaAttributeProperty)[]
SmsAuthenticationMessage
The contents of the SMS authentication message.
public virtual string? SmsAuthenticationMessage { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
SmsConfiguration
The settings for your Amazon Cognito user pool to send SMS messages with Amazon Simple Notification Service.
public virtual object? SmsConfiguration { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.ISmsConfigurationProperty
SmsVerificationMessage
This parameter is no longer used.
public virtual string? SmsVerificationMessage { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
UserAttributeUpdateSettings
The settings for updates to user attributes.
public virtual object? UserAttributeUpdateSettings { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IUserAttributeUpdateSettingsProperty
UserPoolAddOns
Contains settings for activation of threat protection, including the operating mode and additional authentication types.
public virtual object? UserPoolAddOns { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IUserPoolAddOnsProperty
UserPoolName
A friendly name for your user pool.
public virtual string? UserPoolName { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
UserPoolRef
A reference to a UserPool resource.
public virtual IUserPoolReference UserPoolRef { get; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
UserPoolTagsRaw
The tag keys and values to assign to the user pool.
public virtual object? UserPoolTagsRaw { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
UserPoolTier
The user pool feature plan , 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 .
public virtual string? UserPoolTier { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
UsernameAttributes
Specifies whether a user can use an email address or phone number as a username when they sign up.
public virtual string[]? UsernameAttributes { get; set; }
Property Value
string[]
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
UsernameConfiguration
Sets the case sensitivity option for sign-in usernames.
public virtual object? UsernameConfiguration { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IUsernameConfigurationProperty
VerificationMessageTemplate
The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.
public virtual object? VerificationMessageTemplate { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnUserPool.IVerificationMessageTemplateProperty
WebAuthnRelyingPartyId
Sets or displays the authentication domain, typically your user pool domain, that passkey providers must use as a relying party (RP) in their configuration.
public virtual string? WebAuthnRelyingPartyId { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
WebAuthnUserVerification
When required , users can only register and sign in users with passkeys that are capable of user verification . When preferred , your user pool doesn't require the use of authenticators with user verification but encourages it.
public virtual string? WebAuthnUserVerification { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
Methods
ArnForUserPool(IUserPoolRef)
The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.
public static string ArnForUserPool(IUserPoolRef resource)
Parameters
- resource IUserPoolRef
Returns
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
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 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" },
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 {
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"
},
WebAuthnRelyingPartyId = "webAuthnRelyingPartyId",
WebAuthnUserVerification = "webAuthnUserVerification"
});
FromUserPoolArn(Construct, string, string)
Creates a new IUserPoolRef from an ARN.
public static IUserPoolRef FromUserPoolArn(Construct scope, string id, string arn)
Parameters
Returns
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
FromUserPoolId(Construct, string, string)
Creates a new IUserPoolRef from a userPoolId.
public static IUserPoolRef FromUserPoolId(Construct scope, string id, string userPoolId)
Parameters
Returns
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
IsCfnUserPool(object)
Checks whether the given object is a CfnUserPool.
public static bool IsCfnUserPool(object x)
Parameters
- x object
Returns
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
The AWS::Cognito::UserPool resource creates an Amazon Cognito user pool.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
CloudformationResource: AWS::Cognito::UserPool
ExampleMetadata: fixture=_generated