CognitoIdentityProvider / Client / list_user_pools

list_user_pools#

CognitoIdentityProvider.Client.list_user_pools(**kwargs)#

Lists the user pools associated with an Amazon Web Services account.

Note

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

See also: AWS API Documentation

Request Syntax

response = client.list_user_pools(
    NextToken='string',
    MaxResults=123
)
Parameters:
  • 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.

  • MaxResults (integer) –

    [REQUIRED]

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

Return type:

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',
                'PreTokenGenerationConfig': {
                    'LambdaVersion': 'V1_0'|'V2_0',
                    'LambdaArn': '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 Lambda configuration information in a user pool description.

          • PreSignUp (string) –

            A pre-registration Lambda trigger.

          • CustomMessage (string) –

            A custom Message Lambda trigger.

          • PostConfirmation (string) –

            A post-confirmation Lambda trigger.

          • PreAuthentication (string) –

            A pre-authentication Lambda trigger.

          • PostAuthentication (string) –

            A post-authentication Lambda trigger.

          • DefineAuthChallenge (string) –

            Defines the authentication challenge.

          • CreateAuthChallenge (string) –

            Creates an authentication challenge.

          • VerifyAuthChallengeResponse (string) –

            Verifies the authentication challenge response.

          • PreTokenGeneration (string) –

            The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.

            Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, its value must be identical to PreTokenGeneration. For new instances of pre token generation triggers, set the LambdaArn of PreTokenGenerationConfig.

            You can set

          • UserMigration (string) –

            The user migration Lambda config type.

          • PreTokenGenerationConfig (dict) –

            The detailed configuration of a pre token generation trigger. If you also set an ARN in PreTokenGeneration, its value must be identical to PreTokenGenerationConfig.

            • LambdaVersion (string) –

              The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.

            • LambdaArn (string) –

              The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.

              This parameter and the PreTokenGeneration property of LambdaConfig have the same value. For new instances of pre token generation triggers, set LambdaArn.

          • CustomSMSSender (dict) –

            A custom SMS sender Lambda trigger.

            • LambdaVersion (string) –

              The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.

              You must use a LambdaVersion of V1_0 with a custom sender function.

            • LambdaArn (string) –

              The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.

          • CustomEmailSender (dict) –

            A custom email sender Lambda trigger.

            • LambdaVersion (string) –

              The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.

              You must use a LambdaVersion of V1_0 with a custom sender function.

            • LambdaArn (string) –

              The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.

          • KMSKeyID (string) –

            The Amazon Resource Name (ARN) of an KMS key. 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 and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object.

        • CreationDate (datetime) –

          The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object.

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

Exceptions