Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a new Amazon Cognito user pool and sets the password policy for the pool.
This action might generate an SMS text message. Starting June 1, 2021, U.S. telecom carriers require that you register an origination phone number before you can send SMS messages to U.S. phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Cognito will use the the registered number automatically. Otherwise, Cognito users that must receive SMS messages might be unable to sign up, activate their accounts, or sign in.
If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service, Amazon SNS might place your account in SMS sandbox. In <https:docs.aws.amazon.comsnslatestdgsns-sms-sandbox.html sandbox mode> , you’ll have limitations, such as sending messages to only verified phone numbers. After testing in the sandbox environment, you can move out of the SMS sandbox and into production. For more information, see SMS message settings for Cognito User Pools in the Amazon Cognito Developer Guide.
Synopsis
- data CreateUserPool = CreateUserPool' {
- userPoolTags :: Maybe (HashMap Text Text)
- verificationMessageTemplate :: Maybe VerificationMessageTemplateType
- emailVerificationMessage :: Maybe Text
- smsAuthenticationMessage :: Maybe Text
- userPoolAddOns :: Maybe UserPoolAddOnsType
- emailVerificationSubject :: Maybe Text
- usernameAttributes :: Maybe [UsernameAttributeType]
- aliasAttributes :: Maybe [AliasAttributeType]
- schema :: Maybe (NonEmpty SchemaAttributeType)
- accountRecoverySetting :: Maybe AccountRecoverySettingType
- emailConfiguration :: Maybe EmailConfigurationType
- smsVerificationMessage :: Maybe Text
- mfaConfiguration :: Maybe UserPoolMfaType
- lambdaConfig :: Maybe LambdaConfigType
- smsConfiguration :: Maybe SmsConfigurationType
- adminCreateUserConfig :: Maybe AdminCreateUserConfigType
- deviceConfiguration :: Maybe DeviceConfigurationType
- autoVerifiedAttributes :: Maybe [VerifiedAttributeType]
- policies :: Maybe UserPoolPolicyType
- usernameConfiguration :: Maybe UsernameConfigurationType
- poolName :: Text
- newCreateUserPool :: Text -> CreateUserPool
- createUserPool_userPoolTags :: Lens' CreateUserPool (Maybe (HashMap Text Text))
- createUserPool_verificationMessageTemplate :: Lens' CreateUserPool (Maybe VerificationMessageTemplateType)
- createUserPool_emailVerificationMessage :: Lens' CreateUserPool (Maybe Text)
- createUserPool_smsAuthenticationMessage :: Lens' CreateUserPool (Maybe Text)
- createUserPool_userPoolAddOns :: Lens' CreateUserPool (Maybe UserPoolAddOnsType)
- createUserPool_emailVerificationSubject :: Lens' CreateUserPool (Maybe Text)
- createUserPool_usernameAttributes :: Lens' CreateUserPool (Maybe [UsernameAttributeType])
- createUserPool_aliasAttributes :: Lens' CreateUserPool (Maybe [AliasAttributeType])
- createUserPool_schema :: Lens' CreateUserPool (Maybe (NonEmpty SchemaAttributeType))
- createUserPool_accountRecoverySetting :: Lens' CreateUserPool (Maybe AccountRecoverySettingType)
- createUserPool_emailConfiguration :: Lens' CreateUserPool (Maybe EmailConfigurationType)
- createUserPool_smsVerificationMessage :: Lens' CreateUserPool (Maybe Text)
- createUserPool_mfaConfiguration :: Lens' CreateUserPool (Maybe UserPoolMfaType)
- createUserPool_lambdaConfig :: Lens' CreateUserPool (Maybe LambdaConfigType)
- createUserPool_smsConfiguration :: Lens' CreateUserPool (Maybe SmsConfigurationType)
- createUserPool_adminCreateUserConfig :: Lens' CreateUserPool (Maybe AdminCreateUserConfigType)
- createUserPool_deviceConfiguration :: Lens' CreateUserPool (Maybe DeviceConfigurationType)
- createUserPool_autoVerifiedAttributes :: Lens' CreateUserPool (Maybe [VerifiedAttributeType])
- createUserPool_policies :: Lens' CreateUserPool (Maybe UserPoolPolicyType)
- createUserPool_usernameConfiguration :: Lens' CreateUserPool (Maybe UsernameConfigurationType)
- createUserPool_poolName :: Lens' CreateUserPool Text
- data CreateUserPoolResponse = CreateUserPoolResponse' {}
- newCreateUserPoolResponse :: Int -> CreateUserPoolResponse
- createUserPoolResponse_userPool :: Lens' CreateUserPoolResponse (Maybe UserPoolType)
- createUserPoolResponse_httpStatus :: Lens' CreateUserPoolResponse Int
Creating a Request
data CreateUserPool Source #
Represents the request to create a user pool.
See: newCreateUserPool
smart constructor.
CreateUserPool' | |
|
Instances
Create a value of CreateUserPool
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:userPoolTags:CreateUserPool'
, createUserPool_userPoolTags
- The tag keys and values to assign to the user pool. 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.
$sel:verificationMessageTemplate:CreateUserPool'
, createUserPool_verificationMessageTemplate
- The template for the verification message that the user sees when the
app requests permission to access the user's information.
$sel:emailVerificationMessage:CreateUserPool'
, createUserPool_emailVerificationMessage
- A string representing the email verification message.
EmailVerificationMessage is allowed only if
EmailSendingAccount
is DEVELOPER.
$sel:smsAuthenticationMessage:CreateUserPool'
, createUserPool_smsAuthenticationMessage
- A string representing the SMS authentication message.
$sel:userPoolAddOns:CreateUserPool'
, createUserPool_userPoolAddOns
- Used to enable advanced security risk detection. Set the key
AdvancedSecurityMode
to the value "AUDIT".
$sel:emailVerificationSubject:CreateUserPool'
, createUserPool_emailVerificationSubject
- A string representing the email verification subject.
EmailVerificationSubject is allowed only if
EmailSendingAccount
is DEVELOPER.
$sel:usernameAttributes:CreateUserPool'
, createUserPool_usernameAttributes
- Specifies whether email addresses or phone numbers can be specified as
usernames when a user signs up.
$sel:aliasAttributes:CreateUserPool'
, createUserPool_aliasAttributes
- Attributes supported as an alias for this user pool. Possible values:
phone_number, email, or preferred_username.
$sel:schema:CreateUserPool'
, createUserPool_schema
- An array of schema attributes for the new user pool. These attributes
can be standard or custom attributes.
$sel:accountRecoverySetting:CreateUserPool'
, createUserPool_accountRecoverySetting
- Use this setting to define which verified available method a user can
use to recover their password when they call ForgotPassword
. 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.
$sel:emailConfiguration:CreateUserPool'
, createUserPool_emailConfiguration
- The email configuration.
$sel:smsVerificationMessage:CreateUserPool'
, createUserPool_smsVerificationMessage
- A string representing the SMS verification message.
$sel:mfaConfiguration:CreateUserPool'
, createUserPool_mfaConfiguration
- Specifies MFA configuration details.
$sel:lambdaConfig:CreateUserPool'
, createUserPool_lambdaConfig
- The Lambda trigger configuration information for the new user pool.
In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you will need to 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 CLI, see add-permission .
$sel:smsConfiguration:CreateUserPool'
, createUserPool_smsConfiguration
- The SMS configuration.
$sel:adminCreateUserConfig:CreateUserPool'
, createUserPool_adminCreateUserConfig
- The configuration for AdminCreateUser
requests.
$sel:deviceConfiguration:CreateUserPool'
, createUserPool_deviceConfiguration
- The device configuration.
$sel:autoVerifiedAttributes:CreateUserPool'
, createUserPool_autoVerifiedAttributes
- The attributes to be auto-verified. Possible values: email,
phone_number.
$sel:policies:CreateUserPool'
, createUserPool_policies
- The policies associated with the new user pool.
$sel:usernameConfiguration:CreateUserPool'
, createUserPool_usernameConfiguration
- You can choose to set case sensitivity on the username input for the
selected sign-in option. 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. For more information,
see
UsernameConfigurationType.
$sel:poolName:CreateUserPool'
, createUserPool_poolName
- A string used to name the user pool.
Request Lenses
createUserPool_userPoolTags :: Lens' CreateUserPool (Maybe (HashMap Text Text)) Source #
The tag keys and values to assign to the user pool. 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.
createUserPool_verificationMessageTemplate :: Lens' CreateUserPool (Maybe VerificationMessageTemplateType) Source #
The template for the verification message that the user sees when the app requests permission to access the user's information.
createUserPool_emailVerificationMessage :: Lens' CreateUserPool (Maybe Text) Source #
A string representing the email verification message. EmailVerificationMessage is allowed only if EmailSendingAccount is DEVELOPER.
createUserPool_smsAuthenticationMessage :: Lens' CreateUserPool (Maybe Text) Source #
A string representing the SMS authentication message.
createUserPool_userPoolAddOns :: Lens' CreateUserPool (Maybe UserPoolAddOnsType) Source #
Used to enable advanced security risk detection. Set the key
AdvancedSecurityMode
to the value "AUDIT".
createUserPool_emailVerificationSubject :: Lens' CreateUserPool (Maybe Text) Source #
A string representing the email verification subject. EmailVerificationSubject is allowed only if EmailSendingAccount is DEVELOPER.
createUserPool_usernameAttributes :: Lens' CreateUserPool (Maybe [UsernameAttributeType]) Source #
Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.
createUserPool_aliasAttributes :: Lens' CreateUserPool (Maybe [AliasAttributeType]) Source #
Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.
createUserPool_schema :: Lens' CreateUserPool (Maybe (NonEmpty SchemaAttributeType)) Source #
An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
createUserPool_accountRecoverySetting :: Lens' CreateUserPool (Maybe AccountRecoverySettingType) Source #
Use this setting to define which verified available method a user can
use to recover their password when they call ForgotPassword
. 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.
createUserPool_emailConfiguration :: Lens' CreateUserPool (Maybe EmailConfigurationType) Source #
The email configuration.
createUserPool_smsVerificationMessage :: Lens' CreateUserPool (Maybe Text) Source #
A string representing the SMS verification message.
createUserPool_mfaConfiguration :: Lens' CreateUserPool (Maybe UserPoolMfaType) Source #
Specifies MFA configuration details.
createUserPool_lambdaConfig :: Lens' CreateUserPool (Maybe LambdaConfigType) Source #
The Lambda trigger configuration information for the new user pool.
In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you will need to 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 CLI, see add-permission .
createUserPool_smsConfiguration :: Lens' CreateUserPool (Maybe SmsConfigurationType) Source #
The SMS configuration.
createUserPool_adminCreateUserConfig :: Lens' CreateUserPool (Maybe AdminCreateUserConfigType) Source #
The configuration for AdminCreateUser
requests.
createUserPool_deviceConfiguration :: Lens' CreateUserPool (Maybe DeviceConfigurationType) Source #
The device configuration.
createUserPool_autoVerifiedAttributes :: Lens' CreateUserPool (Maybe [VerifiedAttributeType]) Source #
The attributes to be auto-verified. Possible values: email, phone_number.
createUserPool_policies :: Lens' CreateUserPool (Maybe UserPoolPolicyType) Source #
The policies associated with the new user pool.
createUserPool_usernameConfiguration :: Lens' CreateUserPool (Maybe UsernameConfigurationType) Source #
You can choose to set case sensitivity on the username input for the
selected sign-in option. 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. For more information,
see
UsernameConfigurationType.
createUserPool_poolName :: Lens' CreateUserPool Text Source #
A string used to name the user pool.
Destructuring the Response
data CreateUserPoolResponse Source #
Represents the response from the server for the request to create a user pool.
See: newCreateUserPoolResponse
smart constructor.
CreateUserPoolResponse' | |
|
Instances
newCreateUserPoolResponse Source #
Create a value of CreateUserPoolResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:userPool:CreateUserPoolResponse'
, createUserPoolResponse_userPool
- A container for the user pool details.
$sel:httpStatus:CreateUserPoolResponse'
, createUserPoolResponse_httpStatus
- The response's http status code.
Response Lenses
createUserPoolResponse_userPool :: Lens' CreateUserPoolResponse (Maybe UserPoolType) Source #
A container for the user pool details.
createUserPoolResponse_httpStatus :: Lens' CreateUserPoolResponse Int Source #
The response's http status code.