libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CognitoIdentityProvider.CreateUserPool

Description

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

Creating a Request

data CreateUserPool Source #

Represents the request to create a user pool.

See: newCreateUserPool smart constructor.

Constructors

CreateUserPool' 

Fields

Instances

Instances details
Eq CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Read CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Show CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Generic CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Associated Types

type Rep CreateUserPool :: Type -> Type #

NFData CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Methods

rnf :: CreateUserPool -> () #

Hashable CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

ToJSON CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

AWSRequest CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Associated Types

type AWSResponse CreateUserPool #

ToHeaders CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

ToPath CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

ToQuery CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

type Rep CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

type Rep CreateUserPool = D1 ('MetaData "CreateUserPool" "Amazonka.CognitoIdentityProvider.CreateUserPool" "libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp" 'False) (C1 ('MetaCons "CreateUserPool'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "userPoolTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "verificationMessageTemplate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VerificationMessageTemplateType))) :*: (S1 ('MetaSel ('Just "emailVerificationMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "smsAuthenticationMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "userPoolAddOns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserPoolAddOnsType))))) :*: ((S1 ('MetaSel ('Just "emailVerificationSubject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "usernameAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [UsernameAttributeType]))) :*: (S1 ('MetaSel ('Just "aliasAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AliasAttributeType])) :*: (S1 ('MetaSel ('Just "schema") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty SchemaAttributeType))) :*: S1 ('MetaSel ('Just "accountRecoverySetting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AccountRecoverySettingType)))))) :*: (((S1 ('MetaSel ('Just "emailConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EmailConfigurationType)) :*: S1 ('MetaSel ('Just "smsVerificationMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "mfaConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserPoolMfaType)) :*: (S1 ('MetaSel ('Just "lambdaConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LambdaConfigType)) :*: S1 ('MetaSel ('Just "smsConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SmsConfigurationType))))) :*: ((S1 ('MetaSel ('Just "adminCreateUserConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AdminCreateUserConfigType)) :*: (S1 ('MetaSel ('Just "deviceConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DeviceConfigurationType)) :*: S1 ('MetaSel ('Just "autoVerifiedAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [VerifiedAttributeType])))) :*: (S1 ('MetaSel ('Just "policies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserPoolPolicyType)) :*: (S1 ('MetaSel ('Just "usernameConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UsernameConfigurationType)) :*: S1 ('MetaSel ('Just "poolName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))))
type AWSResponse CreateUserPool Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

newCreateUserPool Source #

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_smsVerificationMessage :: Lens' CreateUserPool (Maybe Text) Source #

A string representing the SMS verification message.

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_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.

Constructors

CreateUserPoolResponse' 

Fields

Instances

Instances details
Eq CreateUserPoolResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Read CreateUserPoolResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Show CreateUserPoolResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Generic CreateUserPoolResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Associated Types

type Rep CreateUserPoolResponse :: Type -> Type #

NFData CreateUserPoolResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

Methods

rnf :: CreateUserPoolResponse -> () #

type Rep CreateUserPoolResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.CreateUserPool

type Rep CreateUserPoolResponse = D1 ('MetaData "CreateUserPoolResponse" "Amazonka.CognitoIdentityProvider.CreateUserPool" "libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp" 'False) (C1 ('MetaCons "CreateUserPoolResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "userPool") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserPoolType)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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