Amazon Cognito Identity Provider

2020/11/24 - Amazon Cognito Identity Provider - 4 updated api methods

Changes  Update cognito-idp client to latest version

CreateUserPool (updated) Link ¶
Changes (request, response)
Request
{'LambdaConfig': {'CustomEmailSender': {'LambdaArn': 'string',
                                        'LambdaVersion': 'V1_0'},
                  'CustomSMSSender': {'LambdaArn': 'string',
                                      'LambdaVersion': 'V1_0'},
                  'KMSKeyID': 'string'}}
Response
{'UserPool': {'LambdaConfig': {'CustomEmailSender': {'LambdaArn': 'string',
                                                     'LambdaVersion': 'V1_0'},
                               'CustomSMSSender': {'LambdaArn': 'string',
                                                   'LambdaVersion': 'V1_0'},
                               'KMSKeyID': 'string'}}}

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

See also: AWS API Documentation

Request Syntax

client.create_user_pool(
    PoolName='string',
    Policies={
        'PasswordPolicy': {
            'MinimumLength': 123,
            'RequireUppercase': True|False,
            'RequireLowercase': True|False,
            'RequireNumbers': True|False,
            'RequireSymbols': True|False,
            'TemporaryPasswordValidityDays': 123
        }
    },
    LambdaConfig={
        'PreSignUp': 'string',
        'CustomMessage': 'string',
        'PostConfirmation': 'string',
        'PreAuthentication': 'string',
        'PostAuthentication': 'string',
        'DefineAuthChallenge': 'string',
        'CreateAuthChallenge': 'string',
        'VerifyAuthChallengeResponse': 'string',
        'PreTokenGeneration': 'string',
        'UserMigration': 'string',
        'CustomSMSSender': {
            'LambdaVersion': 'V1_0',
            'LambdaArn': 'string'
        },
        'CustomEmailSender': {
            'LambdaVersion': 'V1_0',
            'LambdaArn': 'string'
        },
        'KMSKeyID': 'string'
    },
    AutoVerifiedAttributes=[
        'phone_number'|'email',
    ],
    AliasAttributes=[
        'phone_number'|'email'|'preferred_username',
    ],
    UsernameAttributes=[
        'phone_number'|'email',
    ],
    SmsVerificationMessage='string',
    EmailVerificationMessage='string',
    EmailVerificationSubject='string',
    VerificationMessageTemplate={
        'SmsMessage': 'string',
        'EmailMessage': 'string',
        'EmailSubject': 'string',
        'EmailMessageByLink': 'string',
        'EmailSubjectByLink': 'string',
        'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
    },
    SmsAuthenticationMessage='string',
    MfaConfiguration='OFF'|'ON'|'OPTIONAL',
    DeviceConfiguration={
        'ChallengeRequiredOnNewDevice': True|False,
        'DeviceOnlyRememberedOnUserPrompt': True|False
    },
    EmailConfiguration={
        'SourceArn': 'string',
        'ReplyToEmailAddress': 'string',
        'EmailSendingAccount': 'COGNITO_DEFAULT'|'DEVELOPER',
        'From': 'string',
        'ConfigurationSet': 'string'
    },
    SmsConfiguration={
        'SnsCallerArn': 'string',
        'ExternalId': 'string'
    },
    UserPoolTags={
        'string': 'string'
    },
    AdminCreateUserConfig={
        'AllowAdminCreateUserOnly': True|False,
        'UnusedAccountValidityDays': 123,
        'InviteMessageTemplate': {
            'SMSMessage': 'string',
            'EmailMessage': 'string',
            'EmailSubject': 'string'
        }
    },
    Schema=[
        {
            'Name': 'string',
            'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
            'DeveloperOnlyAttribute': True|False,
            'Mutable': True|False,
            'Required': True|False,
            'NumberAttributeConstraints': {
                'MinValue': 'string',
                'MaxValue': 'string'
            },
            'StringAttributeConstraints': {
                'MinLength': 'string',
                'MaxLength': 'string'
            }
        },
    ],
    UserPoolAddOns={
        'AdvancedSecurityMode': 'OFF'|'AUDIT'|'ENFORCED'
    },
    UsernameConfiguration={
        'CaseSensitive': True|False
    },
    AccountRecoverySetting={
        'RecoveryMechanisms': [
            {
                'Priority': 123,
                'Name': 'verified_email'|'verified_phone_number'|'admin_only'
            },
        ]
    }
)
type PoolName:

string

param PoolName:

[REQUIRED]

A string used to name the user pool.

type Policies:

dict

param Policies:

The policies associated with the new user pool.

  • PasswordPolicy (dict) --

    The password policy.

    • MinimumLength (integer) --

      The minimum length of the password policy that you have set. Cannot be less than 6.

    • RequireUppercase (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

    • RequireLowercase (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

    • RequireNumbers (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

    • RequireSymbols (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

    • TemporaryPasswordValidityDays (integer) --

      In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.

type LambdaConfig:

dict

param LambdaConfig:

The Lambda trigger configuration information for the new user pool.

  • PreSignUp (string) --

    A pre-registration AWS Lambda trigger.

  • CustomMessage (string) --

    A custom Message AWS Lambda trigger.

  • PostConfirmation (string) --

    A post-confirmation AWS Lambda trigger.

  • PreAuthentication (string) --

    A pre-authentication AWS Lambda trigger.

  • PostAuthentication (string) --

    A post-authentication AWS Lambda trigger.

  • DefineAuthChallenge (string) --

    Defines the authentication challenge.

  • CreateAuthChallenge (string) --

    Creates an authentication challenge.

  • VerifyAuthChallengeResponse (string) --

    Verifies the authentication challenge response.

  • PreTokenGeneration (string) --

    A Lambda trigger that is invoked before token generation.

  • UserMigration (string) --

    The user migration Lambda config type.

  • CustomSMSSender (dict) --

    A custom SMS sender AWS Lambda trigger.

    • LambdaVersion (string) -- [REQUIRED]

      The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

    • LambdaArn (string) -- [REQUIRED]

      The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.

  • CustomEmailSender (dict) --

    A custom email sender AWS Lambda trigger.

    • LambdaVersion (string) -- [REQUIRED]

      The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

    • LambdaArn (string) -- [REQUIRED]

      The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.

  • KMSKeyID (string) --

    The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.

type AutoVerifiedAttributes:

list

param AutoVerifiedAttributes:

The attributes to be auto-verified. Possible values: email, phone_number.

  • (string) --

type AliasAttributes:

list

param AliasAttributes:

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

  • (string) --

type UsernameAttributes:

list

param UsernameAttributes:

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

  • (string) --

type SmsVerificationMessage:

string

param SmsVerificationMessage:

A string representing the SMS verification message.

type EmailVerificationMessage:

string

param EmailVerificationMessage:

A string representing the email verification message. EmailVerificationMessage is allowed only if EmailSendingAccount is DEVELOPER.

type EmailVerificationSubject:

string

param EmailVerificationSubject:

A string representing the email verification subject. EmailVerificationSubject is allowed only if EmailSendingAccount is DEVELOPER.

type VerificationMessageTemplate:

dict

param VerificationMessageTemplate:

The template for the verification message that the user sees when the app requests permission to access the user's information.

  • SmsMessage (string) --

    The SMS message template.

  • EmailMessage (string) --

    The email message template. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

  • EmailSubject (string) --

    The subject line for the email message template. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

  • EmailMessageByLink (string) --

    The email message template for sending a confirmation link to the user. EmailMessageByLink is allowed only if EmailSendingAccount is DEVELOPER.

  • EmailSubjectByLink (string) --

    The subject line for the email message template for sending a confirmation link to the user. EmailSubjectByLink is allowed only EmailSendingAccount is DEVELOPER.

  • DefaultEmailOption (string) --

    The default email option.

type SmsAuthenticationMessage:

string

param SmsAuthenticationMessage:

A string representing the SMS authentication message.

type MfaConfiguration:

string

param MfaConfiguration:

Specifies MFA configuration details.

type DeviceConfiguration:

dict

param DeviceConfiguration:

The device configuration.

  • ChallengeRequiredOnNewDevice (boolean) --

    Indicates whether a challenge is required on a new device. Only applicable to a new device.

  • DeviceOnlyRememberedOnUserPrompt (boolean) --

    If true, a device is only remembered on user prompt.

type EmailConfiguration:

dict

param EmailConfiguration:

The email configuration.

  • SourceArn (string) --

    The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:

    • If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.

    • If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

  • ReplyToEmailAddress (string) --

    The destination to which the receiver of the email should reply to.

  • EmailSendingAccount (string) --

    Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:

    COGNITO_DEFAULT

    When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.

    To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide.

    The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

    If EmailSendingAccount is COGNITO_DEFAULT, the following parameters aren't allowed:

    • EmailVerificationMessage

    • EmailVerificationSubject

    • InviteMessageTemplate.EmailMessage

    • InviteMessageTemplate.EmailSubject

    • VerificationMessageTemplate.EmailMessage

    • VerificationMessageTemplate.EmailMessageByLink

    • VerificationMessageTemplate.EmailSubject,

    • VerificationMessageTemplate.EmailSubjectByLink

    When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.

    If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

    Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.

  • From (string) --

    Identifies either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User <testuser@example.com>. This address will appear before the body of the email.

  • ConfigurationSet (string) --

    The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:

    • Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.

    • IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.

type SmsConfiguration:

dict

param SmsConfiguration:

The SMS configuration.

  • SnsCallerArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages. SMS messages are subject to a spending limit.

  • ExternalId (string) --

    The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.

type UserPoolTags:

dict

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

  • (string) --

    • (string) --

type AdminCreateUserConfig:

dict

param AdminCreateUserConfig:

The configuration for AdminCreateUser requests.

  • AllowAdminCreateUserOnly (boolean) --

    Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

  • UnusedAccountValidityDays (integer) --

    The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.

  • InviteMessageTemplate (dict) --

    The message template to be used for the welcome message to new users.

    See also Customizing User Invitation Messages.

    • SMSMessage (string) --

      The message template for SMS messages.

    • EmailMessage (string) --

      The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

    • EmailSubject (string) --

      The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

type Schema:

list

param Schema:

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

  • (dict) --

    Contains information about the schema attribute.

    • Name (string) --

      A schema attribute of the name type.

    • AttributeDataType (string) --

      The attribute data type.

    • DeveloperOnlyAttribute (boolean) --

      Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but cannot be updated using UpdateUserAttributes.

    • Mutable (boolean) --

      Specifies whether the value of the attribute can be changed.

      For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

    • Required (boolean) --

      Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.

    • NumberAttributeConstraints (dict) --

      Specifies the constraints for an attribute of the number type.

      • MinValue (string) --

        The minimum value of an attribute that is of the number data type.

      • MaxValue (string) --

        The maximum value of an attribute that is of the number data type.

    • StringAttributeConstraints (dict) --

      Specifies the constraints for an attribute of the string type.

      • MinLength (string) --

        The minimum length.

      • MaxLength (string) --

        The maximum length.

type UserPoolAddOns:

dict

param UserPoolAddOns:

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".

  • AdvancedSecurityMode (string) -- [REQUIRED]

    The advanced security mode.

type UsernameConfiguration:

dict

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

  • CaseSensitive (boolean) -- [REQUIRED]

    Specifies whether username case sensitivity will be applied for all users in the user pool through Cognito APIs.

    Valid values include:

    • True : Enables case sensitivity for all username input. When this option is set to True, users must sign in using the exact capitalization of their given username. For example, “UserName”. This is the default value.

    • False : Enables case insensitivity for all username input. For example, when this option is set to False, users will be able to sign in using either "username" or "Username". This option also enables both preferred_username and email alias to be case insensitive, in addition to the username attribute.

type AccountRecoverySetting:

dict

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

  • RecoveryMechanisms (list) --

    The list of RecoveryOptionTypes.

    • (dict) --

      A map containing a priority as a key, and recovery method name as a value.

      • Priority (integer) -- [REQUIRED]

        A positive integer specifying priority of a method with 1 being the highest priority.

      • Name (string) -- [REQUIRED]

        Specifies the recovery method for a user.

rtype:

dict

returns:

Response Syntax

{
    'UserPool': {
        'Id': 'string',
        'Name': 'string',
        'Policies': {
            'PasswordPolicy': {
                'MinimumLength': 123,
                'RequireUppercase': True|False,
                'RequireLowercase': True|False,
                'RequireNumbers': True|False,
                'RequireSymbols': True|False,
                'TemporaryPasswordValidityDays': 123
            }
        },
        'LambdaConfig': {
            'PreSignUp': 'string',
            'CustomMessage': 'string',
            'PostConfirmation': 'string',
            'PreAuthentication': 'string',
            'PostAuthentication': 'string',
            'DefineAuthChallenge': 'string',
            'CreateAuthChallenge': 'string',
            'VerifyAuthChallengeResponse': 'string',
            'PreTokenGeneration': 'string',
            'UserMigration': 'string',
            'CustomSMSSender': {
                'LambdaVersion': 'V1_0',
                'LambdaArn': 'string'
            },
            'CustomEmailSender': {
                'LambdaVersion': 'V1_0',
                'LambdaArn': 'string'
            },
            'KMSKeyID': 'string'
        },
        'Status': 'Enabled'|'Disabled',
        'LastModifiedDate': datetime(2015, 1, 1),
        'CreationDate': datetime(2015, 1, 1),
        'SchemaAttributes': [
            {
                'Name': 'string',
                'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
                'DeveloperOnlyAttribute': True|False,
                'Mutable': True|False,
                'Required': True|False,
                'NumberAttributeConstraints': {
                    'MinValue': 'string',
                    'MaxValue': 'string'
                },
                'StringAttributeConstraints': {
                    'MinLength': 'string',
                    'MaxLength': 'string'
                }
            },
        ],
        'AutoVerifiedAttributes': [
            'phone_number'|'email',
        ],
        'AliasAttributes': [
            'phone_number'|'email'|'preferred_username',
        ],
        'UsernameAttributes': [
            'phone_number'|'email',
        ],
        'SmsVerificationMessage': 'string',
        'EmailVerificationMessage': 'string',
        'EmailVerificationSubject': 'string',
        'VerificationMessageTemplate': {
            'SmsMessage': 'string',
            'EmailMessage': 'string',
            'EmailSubject': 'string',
            'EmailMessageByLink': 'string',
            'EmailSubjectByLink': 'string',
            'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
        },
        'SmsAuthenticationMessage': 'string',
        'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
        'DeviceConfiguration': {
            'ChallengeRequiredOnNewDevice': True|False,
            'DeviceOnlyRememberedOnUserPrompt': True|False
        },
        'EstimatedNumberOfUsers': 123,
        'EmailConfiguration': {
            'SourceArn': 'string',
            'ReplyToEmailAddress': 'string',
            'EmailSendingAccount': 'COGNITO_DEFAULT'|'DEVELOPER',
            'From': 'string',
            'ConfigurationSet': 'string'
        },
        'SmsConfiguration': {
            'SnsCallerArn': 'string',
            'ExternalId': 'string'
        },
        'UserPoolTags': {
            'string': 'string'
        },
        'SmsConfigurationFailure': 'string',
        'EmailConfigurationFailure': 'string',
        'Domain': 'string',
        'CustomDomain': 'string',
        'AdminCreateUserConfig': {
            'AllowAdminCreateUserOnly': True|False,
            'UnusedAccountValidityDays': 123,
            'InviteMessageTemplate': {
                'SMSMessage': 'string',
                'EmailMessage': 'string',
                'EmailSubject': 'string'
            }
        },
        'UserPoolAddOns': {
            'AdvancedSecurityMode': 'OFF'|'AUDIT'|'ENFORCED'
        },
        'UsernameConfiguration': {
            'CaseSensitive': True|False
        },
        'Arn': 'string',
        'AccountRecoverySetting': {
            'RecoveryMechanisms': [
                {
                    'Priority': 123,
                    'Name': 'verified_email'|'verified_phone_number'|'admin_only'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    Represents the response from the server for the request to create a user pool.

    • UserPool (dict) --

      A container for the user pool details.

      • Id (string) --

        The ID of the user pool.

      • Name (string) --

        The name of the user pool.

      • Policies (dict) --

        The policies associated with the user pool.

        • PasswordPolicy (dict) --

          The password policy.

          • MinimumLength (integer) --

            The minimum length of the password policy that you have set. Cannot be less than 6.

          • RequireUppercase (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

          • RequireLowercase (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

          • RequireNumbers (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

          • RequireSymbols (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

          • TemporaryPasswordValidityDays (integer) --

            In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.

      • LambdaConfig (dict) --

        The AWS Lambda triggers associated with the user pool.

        • PreSignUp (string) --

          A pre-registration AWS Lambda trigger.

        • CustomMessage (string) --

          A custom Message AWS Lambda trigger.

        • PostConfirmation (string) --

          A post-confirmation AWS Lambda trigger.

        • PreAuthentication (string) --

          A pre-authentication AWS Lambda trigger.

        • PostAuthentication (string) --

          A post-authentication AWS Lambda trigger.

        • DefineAuthChallenge (string) --

          Defines the authentication challenge.

        • CreateAuthChallenge (string) --

          Creates an authentication challenge.

        • VerifyAuthChallengeResponse (string) --

          Verifies the authentication challenge response.

        • PreTokenGeneration (string) --

          A Lambda trigger that is invoked before token generation.

        • UserMigration (string) --

          The user migration Lambda config type.

        • CustomSMSSender (dict) --

          A custom SMS sender AWS Lambda trigger.

          • LambdaVersion (string) --

            The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

          • LambdaArn (string) --

            The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.

        • CustomEmailSender (dict) --

          A custom email sender AWS Lambda trigger.

          • LambdaVersion (string) --

            The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

          • LambdaArn (string) --

            The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.

        • KMSKeyID (string) --

          The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.

      • Status (string) --

        The status of a user pool.

      • LastModifiedDate (datetime) --

        The date the user pool was last modified.

      • CreationDate (datetime) --

        The date the user pool was created.

      • SchemaAttributes (list) --

        A container with the schema attributes of a user pool.

        • (dict) --

          Contains information about the schema attribute.

          • Name (string) --

            A schema attribute of the name type.

          • AttributeDataType (string) --

            The attribute data type.

          • DeveloperOnlyAttribute (boolean) --

            Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but cannot be updated using UpdateUserAttributes.

          • Mutable (boolean) --

            Specifies whether the value of the attribute can be changed.

            For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

          • Required (boolean) --

            Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.

          • NumberAttributeConstraints (dict) --

            Specifies the constraints for an attribute of the number type.

            • MinValue (string) --

              The minimum value of an attribute that is of the number data type.

            • MaxValue (string) --

              The maximum value of an attribute that is of the number data type.

          • StringAttributeConstraints (dict) --

            Specifies the constraints for an attribute of the string type.

            • MinLength (string) --

              The minimum length.

            • MaxLength (string) --

              The maximum length.

      • AutoVerifiedAttributes (list) --

        Specifies the attributes that are auto-verified in a user pool.

        • (string) --

      • AliasAttributes (list) --

        Specifies the attributes that are aliased in a user pool.

        • (string) --

      • UsernameAttributes (list) --

        Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

        • (string) --

      • SmsVerificationMessage (string) --

        The contents of the SMS verification message.

      • EmailVerificationMessage (string) --

        The contents of the email verification message.

      • EmailVerificationSubject (string) --

        The subject of the email verification message.

      • VerificationMessageTemplate (dict) --

        The template for verification messages.

        • SmsMessage (string) --

          The SMS message template.

        • EmailMessage (string) --

          The email message template. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

        • EmailSubject (string) --

          The subject line for the email message template. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

        • EmailMessageByLink (string) --

          The email message template for sending a confirmation link to the user. EmailMessageByLink is allowed only if EmailSendingAccount is DEVELOPER.

        • EmailSubjectByLink (string) --

          The subject line for the email message template for sending a confirmation link to the user. EmailSubjectByLink is allowed only EmailSendingAccount is DEVELOPER.

        • DefaultEmailOption (string) --

          The default email option.

      • SmsAuthenticationMessage (string) --

        The contents of the SMS authentication message.

      • MfaConfiguration (string) --

        Can be one of the following values:

        • OFF - MFA tokens are not required and cannot be specified during user registration.

        • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

        • OPTIONAL - Users have the option when registering to create an MFA token.

      • DeviceConfiguration (dict) --

        The device configuration.

        • ChallengeRequiredOnNewDevice (boolean) --

          Indicates whether a challenge is required on a new device. Only applicable to a new device.

        • DeviceOnlyRememberedOnUserPrompt (boolean) --

          If true, a device is only remembered on user prompt.

      • EstimatedNumberOfUsers (integer) --

        A number estimating the size of the user pool.

      • EmailConfiguration (dict) --

        The email configuration.

        • SourceArn (string) --

          The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:

          • If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.

          • If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

        • ReplyToEmailAddress (string) --

          The destination to which the receiver of the email should reply to.

        • EmailSendingAccount (string) --

          Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:

          COGNITO_DEFAULT

          When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.

          To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide.

          The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

          If EmailSendingAccount is COGNITO_DEFAULT, the following parameters aren't allowed:

          • EmailVerificationMessage

          • EmailVerificationSubject

          • InviteMessageTemplate.EmailMessage

          • InviteMessageTemplate.EmailSubject

          • VerificationMessageTemplate.EmailMessage

          • VerificationMessageTemplate.EmailMessageByLink

          • VerificationMessageTemplate.EmailSubject,

          • VerificationMessageTemplate.EmailSubjectByLink

          When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.

          If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

          Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.

        • From (string) --

          Identifies either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User <testuser@example.com>. This address will appear before the body of the email.

        • ConfigurationSet (string) --

          The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:

          • Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.

          • IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.

      • SmsConfiguration (dict) --

        The SMS configuration.

        • SnsCallerArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages. SMS messages are subject to a spending limit.

        • ExternalId (string) --

          The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.

      • UserPoolTags (dict) --

        The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

        • (string) --

          • (string) --

      • SmsConfigurationFailure (string) --

        The reason why the SMS configuration cannot send the messages to your users.

      • EmailConfigurationFailure (string) --

        The reason why the email configuration cannot send the messages to your users.

      • Domain (string) --

        Holds the domain prefix if the user pool has a domain associated with it.

      • CustomDomain (string) --

        A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. For example: auth.example.com.

        For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

      • AdminCreateUserConfig (dict) --

        The configuration for AdminCreateUser requests.

        • AllowAdminCreateUserOnly (boolean) --

          Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

        • UnusedAccountValidityDays (integer) --

          The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.

        • InviteMessageTemplate (dict) --

          The message template to be used for the welcome message to new users.

          See also Customizing User Invitation Messages.

          • SMSMessage (string) --

            The message template for SMS messages.

          • EmailMessage (string) --

            The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

          • EmailSubject (string) --

            The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

      • UserPoolAddOns (dict) --

        The user pool add-ons.

        • AdvancedSecurityMode (string) --

          The advanced security mode.

      • UsernameConfiguration (dict) --

        You can choose to enable 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.

        • CaseSensitive (boolean) --

          Specifies whether username case sensitivity will be applied for all users in the user pool through Cognito APIs.

          Valid values include:

          • True : Enables case sensitivity for all username input. When this option is set to True, users must sign in using the exact capitalization of their given username. For example, “UserName”. This is the default value.

          • False : Enables case insensitivity for all username input. For example, when this option is set to False, users will be able to sign in using either "username" or "Username". This option also enables both preferred_username and email alias to be case insensitive, in addition to the username attribute.

      • Arn (string) --

        The Amazon Resource Name (ARN) for the user pool.

      • AccountRecoverySetting (dict) --

        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.

        • RecoveryMechanisms (list) --

          The list of RecoveryOptionTypes.

          • (dict) --

            A map containing a priority as a key, and recovery method name as a value.

            • Priority (integer) --

              A positive integer specifying priority of a method with 1 being the highest priority.

            • Name (string) --

              Specifies the recovery method for a user.

DescribeUserPool (updated) Link ¶
Changes (response)
{'UserPool': {'LambdaConfig': {'CustomEmailSender': {'LambdaArn': 'string',
                                                     'LambdaVersion': 'V1_0'},
                               'CustomSMSSender': {'LambdaArn': 'string',
                                                   'LambdaVersion': 'V1_0'},
                               'KMSKeyID': 'string'}}}

Returns the configuration information and metadata of the specified user pool.

See also: AWS API Documentation

Request Syntax

client.describe_user_pool(
    UserPoolId='string'
)
type UserPoolId:

string

param UserPoolId:

[REQUIRED]

The user pool ID for the user pool you want to describe.

rtype:

dict

returns:

Response Syntax

{
    'UserPool': {
        'Id': 'string',
        'Name': 'string',
        'Policies': {
            'PasswordPolicy': {
                'MinimumLength': 123,
                'RequireUppercase': True|False,
                'RequireLowercase': True|False,
                'RequireNumbers': True|False,
                'RequireSymbols': True|False,
                'TemporaryPasswordValidityDays': 123
            }
        },
        'LambdaConfig': {
            'PreSignUp': 'string',
            'CustomMessage': 'string',
            'PostConfirmation': 'string',
            'PreAuthentication': 'string',
            'PostAuthentication': 'string',
            'DefineAuthChallenge': 'string',
            'CreateAuthChallenge': 'string',
            'VerifyAuthChallengeResponse': 'string',
            'PreTokenGeneration': 'string',
            'UserMigration': 'string',
            'CustomSMSSender': {
                'LambdaVersion': 'V1_0',
                'LambdaArn': 'string'
            },
            'CustomEmailSender': {
                'LambdaVersion': 'V1_0',
                'LambdaArn': 'string'
            },
            'KMSKeyID': 'string'
        },
        'Status': 'Enabled'|'Disabled',
        'LastModifiedDate': datetime(2015, 1, 1),
        'CreationDate': datetime(2015, 1, 1),
        'SchemaAttributes': [
            {
                'Name': 'string',
                'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
                'DeveloperOnlyAttribute': True|False,
                'Mutable': True|False,
                'Required': True|False,
                'NumberAttributeConstraints': {
                    'MinValue': 'string',
                    'MaxValue': 'string'
                },
                'StringAttributeConstraints': {
                    'MinLength': 'string',
                    'MaxLength': 'string'
                }
            },
        ],
        'AutoVerifiedAttributes': [
            'phone_number'|'email',
        ],
        'AliasAttributes': [
            'phone_number'|'email'|'preferred_username',
        ],
        'UsernameAttributes': [
            'phone_number'|'email',
        ],
        'SmsVerificationMessage': 'string',
        'EmailVerificationMessage': 'string',
        'EmailVerificationSubject': 'string',
        'VerificationMessageTemplate': {
            'SmsMessage': 'string',
            'EmailMessage': 'string',
            'EmailSubject': 'string',
            'EmailMessageByLink': 'string',
            'EmailSubjectByLink': 'string',
            'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
        },
        'SmsAuthenticationMessage': 'string',
        'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
        'DeviceConfiguration': {
            'ChallengeRequiredOnNewDevice': True|False,
            'DeviceOnlyRememberedOnUserPrompt': True|False
        },
        'EstimatedNumberOfUsers': 123,
        'EmailConfiguration': {
            'SourceArn': 'string',
            'ReplyToEmailAddress': 'string',
            'EmailSendingAccount': 'COGNITO_DEFAULT'|'DEVELOPER',
            'From': 'string',
            'ConfigurationSet': 'string'
        },
        'SmsConfiguration': {
            'SnsCallerArn': 'string',
            'ExternalId': 'string'
        },
        'UserPoolTags': {
            'string': 'string'
        },
        'SmsConfigurationFailure': 'string',
        'EmailConfigurationFailure': 'string',
        'Domain': 'string',
        'CustomDomain': 'string',
        'AdminCreateUserConfig': {
            'AllowAdminCreateUserOnly': True|False,
            'UnusedAccountValidityDays': 123,
            'InviteMessageTemplate': {
                'SMSMessage': 'string',
                'EmailMessage': 'string',
                'EmailSubject': 'string'
            }
        },
        'UserPoolAddOns': {
            'AdvancedSecurityMode': 'OFF'|'AUDIT'|'ENFORCED'
        },
        'UsernameConfiguration': {
            'CaseSensitive': True|False
        },
        'Arn': 'string',
        'AccountRecoverySetting': {
            'RecoveryMechanisms': [
                {
                    'Priority': 123,
                    'Name': 'verified_email'|'verified_phone_number'|'admin_only'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    Represents the response to describe the user pool.

    • UserPool (dict) --

      The container of metadata returned by the server to describe the pool.

      • Id (string) --

        The ID of the user pool.

      • Name (string) --

        The name of the user pool.

      • Policies (dict) --

        The policies associated with the user pool.

        • PasswordPolicy (dict) --

          The password policy.

          • MinimumLength (integer) --

            The minimum length of the password policy that you have set. Cannot be less than 6.

          • RequireUppercase (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

          • RequireLowercase (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

          • RequireNumbers (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

          • RequireSymbols (boolean) --

            In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

          • TemporaryPasswordValidityDays (integer) --

            In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.

      • LambdaConfig (dict) --

        The AWS Lambda triggers associated with the user pool.

        • PreSignUp (string) --

          A pre-registration AWS Lambda trigger.

        • CustomMessage (string) --

          A custom Message AWS Lambda trigger.

        • PostConfirmation (string) --

          A post-confirmation AWS Lambda trigger.

        • PreAuthentication (string) --

          A pre-authentication AWS Lambda trigger.

        • PostAuthentication (string) --

          A post-authentication AWS Lambda trigger.

        • DefineAuthChallenge (string) --

          Defines the authentication challenge.

        • CreateAuthChallenge (string) --

          Creates an authentication challenge.

        • VerifyAuthChallengeResponse (string) --

          Verifies the authentication challenge response.

        • PreTokenGeneration (string) --

          A Lambda trigger that is invoked before token generation.

        • UserMigration (string) --

          The user migration Lambda config type.

        • CustomSMSSender (dict) --

          A custom SMS sender AWS Lambda trigger.

          • LambdaVersion (string) --

            The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

          • LambdaArn (string) --

            The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.

        • CustomEmailSender (dict) --

          A custom email sender AWS Lambda trigger.

          • LambdaVersion (string) --

            The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

          • LambdaArn (string) --

            The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.

        • KMSKeyID (string) --

          The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.

      • Status (string) --

        The status of a user pool.

      • LastModifiedDate (datetime) --

        The date the user pool was last modified.

      • CreationDate (datetime) --

        The date the user pool was created.

      • SchemaAttributes (list) --

        A container with the schema attributes of a user pool.

        • (dict) --

          Contains information about the schema attribute.

          • Name (string) --

            A schema attribute of the name type.

          • AttributeDataType (string) --

            The attribute data type.

          • DeveloperOnlyAttribute (boolean) --

            Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but cannot be updated using UpdateUserAttributes.

          • Mutable (boolean) --

            Specifies whether the value of the attribute can be changed.

            For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

          • Required (boolean) --

            Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.

          • NumberAttributeConstraints (dict) --

            Specifies the constraints for an attribute of the number type.

            • MinValue (string) --

              The minimum value of an attribute that is of the number data type.

            • MaxValue (string) --

              The maximum value of an attribute that is of the number data type.

          • StringAttributeConstraints (dict) --

            Specifies the constraints for an attribute of the string type.

            • MinLength (string) --

              The minimum length.

            • MaxLength (string) --

              The maximum length.

      • AutoVerifiedAttributes (list) --

        Specifies the attributes that are auto-verified in a user pool.

        • (string) --

      • AliasAttributes (list) --

        Specifies the attributes that are aliased in a user pool.

        • (string) --

      • UsernameAttributes (list) --

        Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

        • (string) --

      • SmsVerificationMessage (string) --

        The contents of the SMS verification message.

      • EmailVerificationMessage (string) --

        The contents of the email verification message.

      • EmailVerificationSubject (string) --

        The subject of the email verification message.

      • VerificationMessageTemplate (dict) --

        The template for verification messages.

        • SmsMessage (string) --

          The SMS message template.

        • EmailMessage (string) --

          The email message template. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

        • EmailSubject (string) --

          The subject line for the email message template. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

        • EmailMessageByLink (string) --

          The email message template for sending a confirmation link to the user. EmailMessageByLink is allowed only if EmailSendingAccount is DEVELOPER.

        • EmailSubjectByLink (string) --

          The subject line for the email message template for sending a confirmation link to the user. EmailSubjectByLink is allowed only EmailSendingAccount is DEVELOPER.

        • DefaultEmailOption (string) --

          The default email option.

      • SmsAuthenticationMessage (string) --

        The contents of the SMS authentication message.

      • MfaConfiguration (string) --

        Can be one of the following values:

        • OFF - MFA tokens are not required and cannot be specified during user registration.

        • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

        • OPTIONAL - Users have the option when registering to create an MFA token.

      • DeviceConfiguration (dict) --

        The device configuration.

        • ChallengeRequiredOnNewDevice (boolean) --

          Indicates whether a challenge is required on a new device. Only applicable to a new device.

        • DeviceOnlyRememberedOnUserPrompt (boolean) --

          If true, a device is only remembered on user prompt.

      • EstimatedNumberOfUsers (integer) --

        A number estimating the size of the user pool.

      • EmailConfiguration (dict) --

        The email configuration.

        • SourceArn (string) --

          The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:

          • If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.

          • If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

        • ReplyToEmailAddress (string) --

          The destination to which the receiver of the email should reply to.

        • EmailSendingAccount (string) --

          Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:

          COGNITO_DEFAULT

          When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.

          To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide.

          The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

          If EmailSendingAccount is COGNITO_DEFAULT, the following parameters aren't allowed:

          • EmailVerificationMessage

          • EmailVerificationSubject

          • InviteMessageTemplate.EmailMessage

          • InviteMessageTemplate.EmailSubject

          • VerificationMessageTemplate.EmailMessage

          • VerificationMessageTemplate.EmailMessageByLink

          • VerificationMessageTemplate.EmailSubject,

          • VerificationMessageTemplate.EmailSubjectByLink

          When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.

          If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

          Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.

        • From (string) --

          Identifies either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User <testuser@example.com>. This address will appear before the body of the email.

        • ConfigurationSet (string) --

          The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:

          • Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.

          • IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.

      • SmsConfiguration (dict) --

        The SMS configuration.

        • SnsCallerArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages. SMS messages are subject to a spending limit.

        • ExternalId (string) --

          The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.

      • UserPoolTags (dict) --

        The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

        • (string) --

          • (string) --

      • SmsConfigurationFailure (string) --

        The reason why the SMS configuration cannot send the messages to your users.

      • EmailConfigurationFailure (string) --

        The reason why the email configuration cannot send the messages to your users.

      • Domain (string) --

        Holds the domain prefix if the user pool has a domain associated with it.

      • CustomDomain (string) --

        A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. For example: auth.example.com.

        For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

      • AdminCreateUserConfig (dict) --

        The configuration for AdminCreateUser requests.

        • AllowAdminCreateUserOnly (boolean) --

          Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

        • UnusedAccountValidityDays (integer) --

          The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.

        • InviteMessageTemplate (dict) --

          The message template to be used for the welcome message to new users.

          See also Customizing User Invitation Messages.

          • SMSMessage (string) --

            The message template for SMS messages.

          • EmailMessage (string) --

            The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

          • EmailSubject (string) --

            The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

      • UserPoolAddOns (dict) --

        The user pool add-ons.

        • AdvancedSecurityMode (string) --

          The advanced security mode.

      • UsernameConfiguration (dict) --

        You can choose to enable 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.

        • CaseSensitive (boolean) --

          Specifies whether username case sensitivity will be applied for all users in the user pool through Cognito APIs.

          Valid values include:

          • True : Enables case sensitivity for all username input. When this option is set to True, users must sign in using the exact capitalization of their given username. For example, “UserName”. This is the default value.

          • False : Enables case insensitivity for all username input. For example, when this option is set to False, users will be able to sign in using either "username" or "Username". This option also enables both preferred_username and email alias to be case insensitive, in addition to the username attribute.

      • Arn (string) --

        The Amazon Resource Name (ARN) for the user pool.

      • AccountRecoverySetting (dict) --

        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.

        • RecoveryMechanisms (list) --

          The list of RecoveryOptionTypes.

          • (dict) --

            A map containing a priority as a key, and recovery method name as a value.

            • Priority (integer) --

              A positive integer specifying priority of a method with 1 being the highest priority.

            • Name (string) --

              Specifies the recovery method for a user.

ListUserPools (updated) Link ¶
Changes (response)
{'UserPools': {'LambdaConfig': {'CustomEmailSender': {'LambdaArn': 'string',
                                                      'LambdaVersion': 'V1_0'},
                                'CustomSMSSender': {'LambdaArn': 'string',
                                                    'LambdaVersion': 'V1_0'},
                                'KMSKeyID': 'string'}}}

Lists the user pools associated with an AWS account.

See also: AWS API Documentation

Request Syntax

client.list_user_pools(
    NextToken='string',
    MaxResults=123
)
type NextToken:

string

param NextToken:

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

type MaxResults:

integer

param MaxResults:

[REQUIRED]

The maximum number of results you want the request to return when listing the user pools.

rtype:

dict

returns:

Response Syntax

{
    'UserPools': [
        {
            'Id': 'string',
            'Name': 'string',
            'LambdaConfig': {
                'PreSignUp': 'string',
                'CustomMessage': 'string',
                'PostConfirmation': 'string',
                'PreAuthentication': 'string',
                'PostAuthentication': 'string',
                'DefineAuthChallenge': 'string',
                'CreateAuthChallenge': 'string',
                'VerifyAuthChallengeResponse': 'string',
                'PreTokenGeneration': 'string',
                'UserMigration': 'string',
                'CustomSMSSender': {
                    'LambdaVersion': 'V1_0',
                    'LambdaArn': 'string'
                },
                'CustomEmailSender': {
                    'LambdaVersion': 'V1_0',
                    'LambdaArn': 'string'
                },
                'KMSKeyID': 'string'
            },
            'Status': 'Enabled'|'Disabled',
            'LastModifiedDate': datetime(2015, 1, 1),
            'CreationDate': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the response to list user pools.

    • UserPools (list) --

      The user pools from the response to list users.

      • (dict) --

        A user pool description.

        • Id (string) --

          The ID in a user pool description.

        • Name (string) --

          The name in a user pool description.

        • LambdaConfig (dict) --

          The AWS Lambda configuration information in a user pool description.

          • PreSignUp (string) --

            A pre-registration AWS Lambda trigger.

          • CustomMessage (string) --

            A custom Message AWS Lambda trigger.

          • PostConfirmation (string) --

            A post-confirmation AWS Lambda trigger.

          • PreAuthentication (string) --

            A pre-authentication AWS Lambda trigger.

          • PostAuthentication (string) --

            A post-authentication AWS Lambda trigger.

          • DefineAuthChallenge (string) --

            Defines the authentication challenge.

          • CreateAuthChallenge (string) --

            Creates an authentication challenge.

          • VerifyAuthChallengeResponse (string) --

            Verifies the authentication challenge response.

          • PreTokenGeneration (string) --

            A Lambda trigger that is invoked before token generation.

          • UserMigration (string) --

            The user migration Lambda config type.

          • CustomSMSSender (dict) --

            A custom SMS sender AWS Lambda trigger.

            • LambdaVersion (string) --

              The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

            • LambdaArn (string) --

              The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.

          • CustomEmailSender (dict) --

            A custom email sender AWS Lambda trigger.

            • LambdaVersion (string) --

              The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

            • LambdaArn (string) --

              The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.

          • KMSKeyID (string) --

            The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.

        • Status (string) --

          The user pool status in a user pool description.

        • LastModifiedDate (datetime) --

          The date the user pool description was last modified.

        • CreationDate (datetime) --

          The date the user pool description was created.

    • NextToken (string) --

      An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UpdateUserPool (updated) Link ¶
Changes (request)
{'LambdaConfig': {'CustomEmailSender': {'LambdaArn': 'string',
                                        'LambdaVersion': 'V1_0'},
                  'CustomSMSSender': {'LambdaArn': 'string',
                                      'LambdaVersion': 'V1_0'},
                  'KMSKeyID': 'string'}}

Updates the specified user pool with the specified attributes. You can get a list of the current user pool settings using DescribeUserPool.

See also: AWS API Documentation

Request Syntax

client.update_user_pool(
    UserPoolId='string',
    Policies={
        'PasswordPolicy': {
            'MinimumLength': 123,
            'RequireUppercase': True|False,
            'RequireLowercase': True|False,
            'RequireNumbers': True|False,
            'RequireSymbols': True|False,
            'TemporaryPasswordValidityDays': 123
        }
    },
    LambdaConfig={
        'PreSignUp': 'string',
        'CustomMessage': 'string',
        'PostConfirmation': 'string',
        'PreAuthentication': 'string',
        'PostAuthentication': 'string',
        'DefineAuthChallenge': 'string',
        'CreateAuthChallenge': 'string',
        'VerifyAuthChallengeResponse': 'string',
        'PreTokenGeneration': 'string',
        'UserMigration': 'string',
        'CustomSMSSender': {
            'LambdaVersion': 'V1_0',
            'LambdaArn': 'string'
        },
        'CustomEmailSender': {
            'LambdaVersion': 'V1_0',
            'LambdaArn': 'string'
        },
        'KMSKeyID': 'string'
    },
    AutoVerifiedAttributes=[
        'phone_number'|'email',
    ],
    SmsVerificationMessage='string',
    EmailVerificationMessage='string',
    EmailVerificationSubject='string',
    VerificationMessageTemplate={
        'SmsMessage': 'string',
        'EmailMessage': 'string',
        'EmailSubject': 'string',
        'EmailMessageByLink': 'string',
        'EmailSubjectByLink': 'string',
        'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
    },
    SmsAuthenticationMessage='string',
    MfaConfiguration='OFF'|'ON'|'OPTIONAL',
    DeviceConfiguration={
        'ChallengeRequiredOnNewDevice': True|False,
        'DeviceOnlyRememberedOnUserPrompt': True|False
    },
    EmailConfiguration={
        'SourceArn': 'string',
        'ReplyToEmailAddress': 'string',
        'EmailSendingAccount': 'COGNITO_DEFAULT'|'DEVELOPER',
        'From': 'string',
        'ConfigurationSet': 'string'
    },
    SmsConfiguration={
        'SnsCallerArn': 'string',
        'ExternalId': 'string'
    },
    UserPoolTags={
        'string': 'string'
    },
    AdminCreateUserConfig={
        'AllowAdminCreateUserOnly': True|False,
        'UnusedAccountValidityDays': 123,
        'InviteMessageTemplate': {
            'SMSMessage': 'string',
            'EmailMessage': 'string',
            'EmailSubject': 'string'
        }
    },
    UserPoolAddOns={
        'AdvancedSecurityMode': 'OFF'|'AUDIT'|'ENFORCED'
    },
    AccountRecoverySetting={
        'RecoveryMechanisms': [
            {
                'Priority': 123,
                'Name': 'verified_email'|'verified_phone_number'|'admin_only'
            },
        ]
    }
)
type UserPoolId:

string

param UserPoolId:

[REQUIRED]

The user pool ID for the user pool you want to update.

type Policies:

dict

param Policies:

A container with the policies you wish to update in a user pool.

  • PasswordPolicy (dict) --

    The password policy.

    • MinimumLength (integer) --

      The minimum length of the password policy that you have set. Cannot be less than 6.

    • RequireUppercase (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

    • RequireLowercase (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

    • RequireNumbers (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

    • RequireSymbols (boolean) --

      In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

    • TemporaryPasswordValidityDays (integer) --

      In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.

type LambdaConfig:

dict

param LambdaConfig:

The AWS Lambda configuration information from the request to update the user pool.

  • PreSignUp (string) --

    A pre-registration AWS Lambda trigger.

  • CustomMessage (string) --

    A custom Message AWS Lambda trigger.

  • PostConfirmation (string) --

    A post-confirmation AWS Lambda trigger.

  • PreAuthentication (string) --

    A pre-authentication AWS Lambda trigger.

  • PostAuthentication (string) --

    A post-authentication AWS Lambda trigger.

  • DefineAuthChallenge (string) --

    Defines the authentication challenge.

  • CreateAuthChallenge (string) --

    Creates an authentication challenge.

  • VerifyAuthChallengeResponse (string) --

    Verifies the authentication challenge response.

  • PreTokenGeneration (string) --

    A Lambda trigger that is invoked before token generation.

  • UserMigration (string) --

    The user migration Lambda config type.

  • CustomSMSSender (dict) --

    A custom SMS sender AWS Lambda trigger.

    • LambdaVersion (string) -- [REQUIRED]

      The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

    • LambdaArn (string) -- [REQUIRED]

      The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.

  • CustomEmailSender (dict) --

    A custom email sender AWS Lambda trigger.

    • LambdaVersion (string) -- [REQUIRED]

      The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

    • LambdaArn (string) -- [REQUIRED]

      The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.

  • KMSKeyID (string) --

    The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.

type AutoVerifiedAttributes:

list

param AutoVerifiedAttributes:

The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.

  • (string) --

type SmsVerificationMessage:

string

param SmsVerificationMessage:

A container with information about the SMS verification message.

type EmailVerificationMessage:

string

param EmailVerificationMessage:

The contents of the email verification message.

type EmailVerificationSubject:

string

param EmailVerificationSubject:

The subject of the email verification message.

type VerificationMessageTemplate:

dict

param VerificationMessageTemplate:

The template for verification messages.

  • SmsMessage (string) --

    The SMS message template.

  • EmailMessage (string) --

    The email message template. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

  • EmailSubject (string) --

    The subject line for the email message template. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

  • EmailMessageByLink (string) --

    The email message template for sending a confirmation link to the user. EmailMessageByLink is allowed only if EmailSendingAccount is DEVELOPER.

  • EmailSubjectByLink (string) --

    The subject line for the email message template for sending a confirmation link to the user. EmailSubjectByLink is allowed only EmailSendingAccount is DEVELOPER.

  • DefaultEmailOption (string) --

    The default email option.

type SmsAuthenticationMessage:

string

param SmsAuthenticationMessage:

The contents of the SMS authentication message.

type MfaConfiguration:

string

param MfaConfiguration:

Can be one of the following values:

  • OFF - MFA tokens are not required and cannot be specified during user registration.

  • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

  • OPTIONAL - Users have the option when registering to create an MFA token.

type DeviceConfiguration:

dict

param DeviceConfiguration:

Device configuration.

  • ChallengeRequiredOnNewDevice (boolean) --

    Indicates whether a challenge is required on a new device. Only applicable to a new device.

  • DeviceOnlyRememberedOnUserPrompt (boolean) --

    If true, a device is only remembered on user prompt.

type EmailConfiguration:

dict

param EmailConfiguration:

Email configuration.

  • SourceArn (string) --

    The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:

    • If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.

    • If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

  • ReplyToEmailAddress (string) --

    The destination to which the receiver of the email should reply to.

  • EmailSendingAccount (string) --

    Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:

    COGNITO_DEFAULT

    When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.

    To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide.

    The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

    If EmailSendingAccount is COGNITO_DEFAULT, the following parameters aren't allowed:

    • EmailVerificationMessage

    • EmailVerificationSubject

    • InviteMessageTemplate.EmailMessage

    • InviteMessageTemplate.EmailSubject

    • VerificationMessageTemplate.EmailMessage

    • VerificationMessageTemplate.EmailMessageByLink

    • VerificationMessageTemplate.EmailSubject,

    • VerificationMessageTemplate.EmailSubjectByLink

    When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.

    If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

    Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.

  • From (string) --

    Identifies either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User <testuser@example.com>. This address will appear before the body of the email.

  • ConfigurationSet (string) --

    The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:

    • Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.

    • IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.

type SmsConfiguration:

dict

param SmsConfiguration:

SMS configuration.

  • SnsCallerArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages. SMS messages are subject to a spending limit.

  • ExternalId (string) --

    The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.

type UserPoolTags:

dict

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

  • (string) --

    • (string) --

type AdminCreateUserConfig:

dict

param AdminCreateUserConfig:

The configuration for AdminCreateUser requests.

  • AllowAdminCreateUserOnly (boolean) --

    Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

  • UnusedAccountValidityDays (integer) --

    The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.

  • InviteMessageTemplate (dict) --

    The message template to be used for the welcome message to new users.

    See also Customizing User Invitation Messages.

    • SMSMessage (string) --

      The message template for SMS messages.

    • EmailMessage (string) --

      The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

    • EmailSubject (string) --

      The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

type UserPoolAddOns:

dict

param UserPoolAddOns:

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".

  • AdvancedSecurityMode (string) -- [REQUIRED]

    The advanced security mode.

type AccountRecoverySetting:

dict

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

  • RecoveryMechanisms (list) --

    The list of RecoveryOptionTypes.

    • (dict) --

      A map containing a priority as a key, and recovery method name as a value.

      • Priority (integer) -- [REQUIRED]

        A positive integer specifying priority of a method with 1 being the highest priority.

      • Name (string) -- [REQUIRED]

        Specifies the recovery method for a user.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

    Represents the response from the server when you make a request to update the user pool.