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, ITaggable
Syntax (vb)
Public Class CfnUserPool
Inherits CfnResource
Implements IInspectable, 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
},
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
CfnUserPool(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnUserPool(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnUserPool(Construct, String, ICfnUserPoolProps) |
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. |
AttrArn | The Amazon Resource Name (ARN) of the user pool, such as |
AttrProviderName | The provider name of the Amazon Cognito user pool, specified as a |
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 to be auto-verified. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
Policies | The policy associated with a user pool. |
Schema | The schema attributes for the new user pool. |
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. |
Tags | Tag Manager which manages the tags for this resource. |
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. |
UserPoolTagsRaw | 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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnUserPool(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnUserPool(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnUserPool(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnUserPool(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnUserPool(Construct, String, ICfnUserPoolProps)
public CfnUserPool(Construct scope, string id, ICfnUserPoolProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnUserPoolProps
Resource properties.
Properties
AccountRecoverySetting
Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword
.
public virtual object AccountRecoverySetting { get; set; }
Property Value
System.Object
AdminCreateUserConfig
The configuration for creating a new user profile.
public virtual object AdminCreateUserConfig { get; set; }
Property Value
System.Object
AliasAttributes
Attributes supported as an alias for this user pool.
public virtual string[] AliasAttributes { get; set; }
Property Value
System.String[]
Remarks
Possible values: phone_number , email , or preferred_username .
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
System.String
Remarks
CloudformationAttribute: Arn
AttrProviderName
The provider name of the Amazon Cognito user pool, specified as a String
.
public virtual string AttrProviderName { get; }
Property Value
System.String
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
System.String
Remarks
CloudformationAttribute: ProviderURL
AttrUserPoolId
The ID of the user pool.
public virtual string AttrUserPoolId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: UserPoolId
AutoVerifiedAttributes
The attributes to be auto-verified.
public virtual string[] AutoVerifiedAttributes { get; set; }
Property Value
System.String[]
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DeletionProtection
When active, DeletionProtection
prevents accidental deletion of your user pool.
public virtual string DeletionProtection { get; set; }
Property Value
System.String
DeviceConfiguration
The device-remembering configuration for a user pool.
public virtual object DeviceConfiguration { get; set; }
Property Value
System.Object
EmailConfiguration
The email configuration of your user pool.
public virtual object EmailConfiguration { get; set; }
Property Value
System.Object
EmailVerificationMessage
This parameter is no longer used.
public virtual string EmailVerificationMessage { get; set; }
Property Value
System.String
EmailVerificationSubject
This parameter is no longer used.
public virtual string EmailVerificationSubject { get; set; }
Property Value
System.String
EnabledMfas
Enables MFA on a specified user pool.
public virtual string[] EnabledMfas { get; set; }
Property Value
System.String[]
LambdaConfig
The Lambda trigger configuration information for the new user pool.
public virtual object LambdaConfig { get; set; }
Property Value
System.Object
MfaConfiguration
The multi-factor authentication (MFA) configuration.
public virtual string MfaConfiguration { get; set; }
Property Value
System.String
Remarks
Valid values include:.
Policies
The policy associated with a user pool.
public virtual object Policies { get; set; }
Property Value
System.Object
Schema
The schema attributes for the new user pool.
public virtual object Schema { get; set; }
Property Value
System.Object
Remarks
These attributes can be standard or custom attributes.
SmsAuthenticationMessage
A string representing the SMS authentication message.
public virtual string SmsAuthenticationMessage { get; set; }
Property Value
System.String
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 virtual object SmsConfiguration { get; set; }
Property Value
System.Object
SmsVerificationMessage
This parameter is no longer used.
public virtual string SmsVerificationMessage { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
UserAttributeUpdateSettings
The settings for updates to user attributes.
public virtual object UserAttributeUpdateSettings { get; set; }
Property Value
System.Object
UsernameAttributes
Determines whether email addresses or phone numbers can be specified as user names when a user signs up.
public virtual string[] UsernameAttributes { get; set; }
Property Value
System.String[]
UsernameConfiguration
You can choose to set case sensitivity on the username input for the selected sign-in option.
public virtual object UsernameConfiguration { get; set; }
Property Value
System.Object
UserPoolAddOns
User pool add-ons.
public virtual object UserPoolAddOns { get; set; }
Property Value
System.Object
UserPoolName
A string used to name the user pool.
public virtual string UserPoolName { get; set; }
Property Value
System.String
UserPoolTagsRaw
The tag keys and values to assign to the user pool.
public virtual object UserPoolTagsRaw { get; set; }
Property Value
System.Object
VerificationMessageTemplate
The template for the verification message that the user sees when the app requests permission to access the user's information.
public virtual object VerificationMessageTemplate { get; set; }
Property Value
System.Object
Methods
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>