Amazon Cognito Identity Provider

2016/07/28 - Amazon Cognito Identity Provider - 15 new 9 updated api methods

AdminUserGlobalSignOut (new) Link ¶

Signs out users from all devices, as an administrator.

Request Syntax

client.admin_user_global_sign_out(
    UserPoolId='string',
    Username='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID.

type Username

string

param Username

[REQUIRED]

The user name.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The global signot response, as an administrator.

RespondToAuthChallenge (new) Link ¶

Responds to the authentication challenge.

Request Syntax

client.respond_to_auth_challenge(
    ClientId='string',
    ChallengeName='SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH',
    Session='string',
    ChallengeResponses={
        'string': 'string'
    }
)
type ClientId

string

param ClientId

[REQUIRED]

The client ID.

type ChallengeName

string

param ChallengeName

[REQUIRED]

The name of the challenge.

type Session

string

param Session

The session.

type ChallengeResponses

dict

param ChallengeResponses

The responses to the authentication challenge.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH',
    'Session': 'string',
    'ChallengeParameters': {
        'string': 'string'
    },
    'AuthenticationResult': {
        'AccessToken': 'string',
        'ExpiresIn': 123,
        'TokenType': 'string',
        'RefreshToken': 'string',
        'IdToken': 'string',
        'NewDeviceMetadata': {
            'DeviceKey': 'string',
            'DeviceGroupKey': 'string'
        }
    }
}

Response Structure

  • (dict) --

    The response to respond to the authentication challenge.

    • ChallengeName (string) --

      The challenge name.

    • Session (string) --

      The session.

    • ChallengeParameters (dict) --

      The challenge parameters.

      • (string) --

        • (string) --

    • AuthenticationResult (dict) --

      The result type of the authentication result.

      • AccessToken (string) --

        The access token of the authentication result.

      • ExpiresIn (integer) --

        The expiration period of the authentication result.

      • TokenType (string) --

        The token type of the authentication result.

      • RefreshToken (string) --

        The refresh token of the authentication result.

      • IdToken (string) --

        The ID token of the authentication result.

      • NewDeviceMetadata (dict) --

        The new device metadata from an authentication result.

        • DeviceKey (string) --

          The device key.

        • DeviceGroupKey (string) --

          The device group key.

GetDevice (new) Link ¶

Gets the device.

Request Syntax

client.get_device(
    DeviceKey='string',
    AccessToken='string'
)
type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

type AccessToken

string

param AccessToken

The access token.

rtype

dict

returns

Response Syntax

{
    'Device': {
        'DeviceKey': 'string',
        'DeviceAttributes': [
            {
                'Name': 'string',
                'Value': 'string'
            },
        ],
        'DeviceCreateDate': datetime(2015, 1, 1),
        'DeviceLastModifiedDate': datetime(2015, 1, 1),
        'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Gets the device response.

    • Device (dict) --

      The device.

      • DeviceKey (string) --

        The device key.

      • DeviceAttributes (list) --

        The device attributes.

        • (dict) --

          Specifies whether the attribute is standard or custom.

          • Name (string) --

            The name of the attribute.

          • Value (string) --

            The value of the attribute.

      • DeviceCreateDate (datetime) --

        The creation date of the device.

      • DeviceLastModifiedDate (datetime) --

        The last modified date of the device.

      • DeviceLastAuthenticatedDate (datetime) --

        The date in which the device was last authenticated.

UpdateDeviceStatus (new) Link ¶

Updates the device status.

Request Syntax

client.update_device_status(
    AccessToken='string',
    DeviceKey='string',
    DeviceRememberedStatus='remembered'|'not_remembered'
)
type AccessToken

string

param AccessToken

[REQUIRED]

The access token.

type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

type DeviceRememberedStatus

string

param DeviceRememberedStatus

The status of whether a device is remembered.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The response to the request to update the device status.

AdminInitiateAuth (new) Link ¶

Initiates the authentication flow, as an administrator.

Request Syntax

client.admin_initiate_auth(
    UserPoolId='string',
    ClientId='string',
    AuthFlow='USER_SRP_AUTH'|'REFRESH_TOKEN_AUTH'|'CUSTOM_AUTH'|'ADMIN_NO_SRP_AUTH',
    AuthParameters={
        'string': 'string'
    },
    ClientMetadata={
        'string': 'string'
    }
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The ID of the Amazon Cognito user pool.

type ClientId

string

param ClientId

[REQUIRED]

The client app ID.

type AuthFlow

string

param AuthFlow

[REQUIRED]

The authentication flow.

type AuthParameters

dict

param AuthParameters

The authentication parameters.

  • (string) --

    • (string) --

type ClientMetadata

dict

param ClientMetadata

The client app metadata.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH',
    'Session': 'string',
    'ChallengeParameters': {
        'string': 'string'
    },
    'AuthenticationResult': {
        'AccessToken': 'string',
        'ExpiresIn': 123,
        'TokenType': 'string',
        'RefreshToken': 'string',
        'IdToken': 'string',
        'NewDeviceMetadata': {
            'DeviceKey': 'string',
            'DeviceGroupKey': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Initiates the authentication response, as an administrator.

    • ChallengeName (string) --

      The name of the challenge.

    • Session (string) --

      The session.

    • ChallengeParameters (dict) --

      The challenge parameters.

      • (string) --

        • (string) --

    • AuthenticationResult (dict) --

      The result type of the authentication result.

      • AccessToken (string) --

        The access token of the authentication result.

      • ExpiresIn (integer) --

        The expiration period of the authentication result.

      • TokenType (string) --

        The token type of the authentication result.

      • RefreshToken (string) --

        The refresh token of the authentication result.

      • IdToken (string) --

        The ID token of the authentication result.

      • NewDeviceMetadata (dict) --

        The new device metadata from an authentication result.

        • DeviceKey (string) --

          The device key.

        • DeviceGroupKey (string) --

          The device group key.

ListDevices (new) Link ¶

Lists the devices.

Request Syntax

client.list_devices(
    AccessToken='string',
    Limit=123,
    PaginationToken='string'
)
type AccessToken

string

param AccessToken

[REQUIRED]

The access tokens for the request to list devices.

type Limit

integer

param Limit

The limit of the device request.

type PaginationToken

string

param PaginationToken

The pagination token for the list request.

rtype

dict

returns

Response Syntax

{
    'Devices': [
        {
            'DeviceKey': 'string',
            'DeviceAttributes': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'DeviceCreateDate': datetime(2015, 1, 1),
            'DeviceLastModifiedDate': datetime(2015, 1, 1),
            'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
        },
    ],
    'PaginationToken': 'string'
}

Response Structure

  • (dict) --

    Represents the response to list devices.

    • Devices (list) --

      The devices returned in the list devices response.

      • (dict) --

        The device type.

        • DeviceKey (string) --

          The device key.

        • DeviceAttributes (list) --

          The device attributes.

          • (dict) --

            Specifies whether the attribute is standard or custom.

            • Name (string) --

              The name of the attribute.

            • Value (string) --

              The value of the attribute.

        • DeviceCreateDate (datetime) --

          The creation date of the device.

        • DeviceLastModifiedDate (datetime) --

          The last modified date of the device.

        • DeviceLastAuthenticatedDate (datetime) --

          The date in which the device was last authenticated.

    • PaginationToken (string) --

      The pagination token for the list device response.

GlobalSignOut (new) Link ¶

Signs out users from all devices.

Request Syntax

client.global_sign_out(
    AccessToken='string'
)
type AccessToken

string

param AccessToken

The access token.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The response to the request to sign out all devices.

AdminUpdateDeviceStatus (new) Link ¶

Updates the device status as an administrator.

Request Syntax

client.admin_update_device_status(
    UserPoolId='string',
    Username='string',
    DeviceKey='string',
    DeviceRememberedStatus='remembered'|'not_remembered'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID>

type Username

string

param Username

[REQUIRED]

The user name.

type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

type DeviceRememberedStatus

string

param DeviceRememberedStatus

The status indicating whether a device has been remembered or not.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The status response from the request to update the device, as an administrator.

InitiateAuth (new) Link ¶

Initiates the authentication flow.

Request Syntax

client.initiate_auth(
    AuthFlow='USER_SRP_AUTH'|'REFRESH_TOKEN_AUTH'|'CUSTOM_AUTH'|'ADMIN_NO_SRP_AUTH',
    AuthParameters={
        'string': 'string'
    },
    ClientMetadata={
        'string': 'string'
    },
    ClientId='string'
)
type AuthFlow

string

param AuthFlow

[REQUIRED]

The authentication flow.

type AuthParameters

dict

param AuthParameters

The authentication parameters.

  • (string) --

    • (string) --

type ClientMetadata

dict

param ClientMetadata

The client app's metadata.

  • (string) --

    • (string) --

type ClientId

string

param ClientId

[REQUIRED]

The client ID.

rtype

dict

returns

Response Syntax

{
    'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH',
    'Session': 'string',
    'ChallengeParameters': {
        'string': 'string'
    },
    'AuthenticationResult': {
        'AccessToken': 'string',
        'ExpiresIn': 123,
        'TokenType': 'string',
        'RefreshToken': 'string',
        'IdToken': 'string',
        'NewDeviceMetadata': {
            'DeviceKey': 'string',
            'DeviceGroupKey': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Initiates the authentication response.

    • ChallengeName (string) --

      The name of the challenge.

    • Session (string) --

      The session.

    • ChallengeParameters (dict) --

      The challenge parameters.

      • (string) --

        • (string) --

    • AuthenticationResult (dict) --

      The result type of the authentication result.

      • AccessToken (string) --

        The access token of the authentication result.

      • ExpiresIn (integer) --

        The expiration period of the authentication result.

      • TokenType (string) --

        The token type of the authentication result.

      • RefreshToken (string) --

        The refresh token of the authentication result.

      • IdToken (string) --

        The ID token of the authentication result.

      • NewDeviceMetadata (dict) --

        The new device metadata from an authentication result.

        • DeviceKey (string) --

          The device key.

        • DeviceGroupKey (string) --

          The device group key.

AdminRespondToAuthChallenge (new) Link ¶

Responds to an authentication challenge, as an administrator.

Request Syntax

client.admin_respond_to_auth_challenge(
    UserPoolId='string',
    ClientId='string',
    ChallengeName='SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH',
    ChallengeResponses={
        'string': 'string'
    },
    Session='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The ID of the Amazon Cognito user pool.

type ClientId

string

param ClientId

[REQUIRED]

The client ID.

type ChallengeName

string

param ChallengeName

[REQUIRED]

The name of the challenge.

type ChallengeResponses

dict

param ChallengeResponses

The challenge response.

  • (string) --

    • (string) --

type Session

string

param Session

The session.

rtype

dict

returns

Response Syntax

{
    'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH',
    'Session': 'string',
    'ChallengeParameters': {
        'string': 'string'
    },
    'AuthenticationResult': {
        'AccessToken': 'string',
        'ExpiresIn': 123,
        'TokenType': 'string',
        'RefreshToken': 'string',
        'IdToken': 'string',
        'NewDeviceMetadata': {
            'DeviceKey': 'string',
            'DeviceGroupKey': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Responds to the authentication challenge, as an administrator.

    • ChallengeName (string) --

      The name of the challenge.

    • Session (string) --

      The session.

    • ChallengeParameters (dict) --

      The challenge parameters.

      • (string) --

        • (string) --

    • AuthenticationResult (dict) --

      The result type of the authentication result.

      • AccessToken (string) --

        The access token of the authentication result.

      • ExpiresIn (integer) --

        The expiration period of the authentication result.

      • TokenType (string) --

        The token type of the authentication result.

      • RefreshToken (string) --

        The refresh token of the authentication result.

      • IdToken (string) --

        The ID token of the authentication result.

      • NewDeviceMetadata (dict) --

        The new device metadata from an authentication result.

        • DeviceKey (string) --

          The device key.

        • DeviceGroupKey (string) --

          The device group key.

ForgetDevice (new) Link ¶

Forgets the specified device.

Request Syntax

client.forget_device(
    AccessToken='string',
    DeviceKey='string'
)
type AccessToken

string

param AccessToken

The access token for the forgotten device request.

type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

returns

None

AdminListDevices (new) Link ¶

Lists devices, as an administrator.

Request Syntax

client.admin_list_devices(
    UserPoolId='string',
    Username='string',
    Limit=123,
    PaginationToken='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID.

type Username

string

param Username

[REQUIRED]

The user name.

type Limit

integer

param Limit

The limit of the devices request.

type PaginationToken

string

param PaginationToken

The pagination token.

rtype

dict

returns

Response Syntax

{
    'Devices': [
        {
            'DeviceKey': 'string',
            'DeviceAttributes': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'DeviceCreateDate': datetime(2015, 1, 1),
            'DeviceLastModifiedDate': datetime(2015, 1, 1),
            'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
        },
    ],
    'PaginationToken': 'string'
}

Response Structure

  • (dict) --

    Lists the device's response, as an administrator.

    • Devices (list) --

      The devices in the list of devices response.

      • (dict) --

        The device type.

        • DeviceKey (string) --

          The device key.

        • DeviceAttributes (list) --

          The device attributes.

          • (dict) --

            Specifies whether the attribute is standard or custom.

            • Name (string) --

              The name of the attribute.

            • Value (string) --

              The value of the attribute.

        • DeviceCreateDate (datetime) --

          The creation date of the device.

        • DeviceLastModifiedDate (datetime) --

          The last modified date of the device.

        • DeviceLastAuthenticatedDate (datetime) --

          The date in which the device was last authenticated.

    • PaginationToken (string) --

      The pagination token.

AdminForgetDevice (new) Link ¶

Forgets the device, as an administrator.

Request Syntax

client.admin_forget_device(
    UserPoolId='string',
    Username='string',
    DeviceKey='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID.

type Username

string

param Username

[REQUIRED]

The user name.

type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

returns

None

AdminGetDevice (new) Link ¶

Gets the device, as an administrator.

Request Syntax

client.admin_get_device(
    DeviceKey='string',
    UserPoolId='string',
    Username='string'
)
type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID.

type Username

string

param Username

[REQUIRED]

The user name.

rtype

dict

returns

Response Syntax

{
    'Device': {
        'DeviceKey': 'string',
        'DeviceAttributes': [
            {
                'Name': 'string',
                'Value': 'string'
            },
        ],
        'DeviceCreateDate': datetime(2015, 1, 1),
        'DeviceLastModifiedDate': datetime(2015, 1, 1),
        'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Gets the device response, as an administrator.

    • Device (dict) --

      The device.

      • DeviceKey (string) --

        The device key.

      • DeviceAttributes (list) --

        The device attributes.

        • (dict) --

          Specifies whether the attribute is standard or custom.

          • Name (string) --

            The name of the attribute.

          • Value (string) --

            The value of the attribute.

      • DeviceCreateDate (datetime) --

        The creation date of the device.

      • DeviceLastModifiedDate (datetime) --

        The last modified date of the device.

      • DeviceLastAuthenticatedDate (datetime) --

        The date in which the device was last authenticated.

ConfirmDevice (new) Link ¶

Confirms tracking of the device. This API call is the call that beings device tracking.

Request Syntax

client.confirm_device(
    AccessToken='string',
    DeviceKey='string',
    DeviceSecretVerifierConfig={
        'PasswordVerifier': 'string',
        'Salt': 'string'
    },
    DeviceName='string'
)
type AccessToken

string

param AccessToken

[REQUIRED]

The access token.

type DeviceKey

string

param DeviceKey

[REQUIRED]

The device key.

type DeviceSecretVerifierConfig

dict

param DeviceSecretVerifierConfig

The configuration of the device secret verifier.

  • PasswordVerifier (string) --

    The password verifier.

  • Salt (string) --

    The salt.

type DeviceName

string

param DeviceName

The device name.

rtype

dict

returns

Response Syntax

{
    'UserConfirmationNecessary': True|False
}

Response Structure

  • (dict) --

    Confirms the device response.

    • UserConfirmationNecessary (boolean) --

      Indicates whether the user confirmation is necessary to confirm the device response.

AdminGetUser (updated) Link ¶
Changes (response)
{'UserStatus': ['RESET_REQUIRED']}

Gets the specified user by user name in a user pool as an administrator. Works on any user.

Request Syntax

client.admin_get_user(
    UserPoolId='string',
    Username='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID for the user pool where you want to get information about the user.

type Username

string

param Username

[REQUIRED]

The user name of the user you wish to retrieve.

rtype

dict

returns

Response Syntax

{
    'Username': 'string',
    'UserAttributes': [
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    'UserCreateDate': datetime(2015, 1, 1),
    'UserLastModifiedDate': datetime(2015, 1, 1),
    'Enabled': True|False,
    'UserStatus': 'UNCONFIRMED'|'CONFIRMED'|'ARCHIVED'|'COMPROMISED'|'UNKNOWN'|'RESET_REQUIRED',
    'MFAOptions': [
        {
            'DeliveryMedium': 'SMS'|'EMAIL',
            'AttributeName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the response from the server from the request to get the specified user as an administrator.

    • Username (string) --

      The user name of the user about whom you are receiving information.

    • UserAttributes (list) --

      An array of name-value pairs representing user attributes.

      • (dict) --

        Specifies whether the attribute is standard or custom.

        • Name (string) --

          The name of the attribute.

        • Value (string) --

          The value of the attribute.

    • UserCreateDate (datetime) --

      The date the user was created.

    • UserLastModifiedDate (datetime) --

      The date the user was last modified.

    • Enabled (boolean) --

      Indicates that the status is enabled.

    • UserStatus (string) --

      The user status. Can be one of the following:

      • UNCONFIRMED - User has been created but not confirmed.

      • CONFIRMED - User has been confirmed.

      • ARCHIVED - User is no longer active.

      • COMPROMISED - User is disabled due to a potential security threat.

      • UNKNOWN - User status is not known.

    • MFAOptions (list) --

      Specifies the options for MFA (e.g., email or phone number).

      • (dict) --

        Specifies the different settings for multi-factor authentication (MFA).

        • DeliveryMedium (string) --

          The delivery medium (email message or SMS message) to send the MFA code.

        • AttributeName (string) --

          The attribute name of the MFA option type.

CreateUserPool (updated) Link ¶
Changes (request, response)
Request
{'DeviceConfiguration': {'ChallengeRequiredOnNewDevice': 'boolean',
                         'DeviceOnlyRememberedOnUserPrompt': 'boolean'},
 'EmailConfiguration': {'ReplyToEmailAddress': 'string', 'SourceArn': 'string'},
 'LambdaConfig': {'CreateAuthChallenge': 'string',
                  'DefineAuthChallenge': 'string',
                  'VerifyAuthChallengeResponse': 'string'},
 'SmsConfiguration': {'ExternalId': 'string', 'SnsCallerArn': 'string'}}
Response
{'UserPool': {'DeviceConfiguration': {'ChallengeRequiredOnNewDevice': 'boolean',
                                      'DeviceOnlyRememberedOnUserPrompt': 'boolean'},
              'EmailConfiguration': {'ReplyToEmailAddress': 'string',
                                     'SourceArn': 'string'},
              'EmailConfigurationFailure': 'string',
              'LambdaConfig': {'CreateAuthChallenge': 'string',
                               'DefineAuthChallenge': 'string',
                               'VerifyAuthChallengeResponse': 'string'},
              'SmsConfiguration': {'ExternalId': 'string',
                                   'SnsCallerArn': 'string'},
              'SmsConfigurationFailure': 'string'}}

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

Request Syntax

client.create_user_pool(
    PoolName='string',
    Policies={
        'PasswordPolicy': {
            'MinimumLength': 123,
            'RequireUppercase': True|False,
            'RequireLowercase': True|False,
            'RequireNumbers': True|False,
            'RequireSymbols': True|False
        }
    },
    LambdaConfig={
        'PreSignUp': 'string',
        'CustomMessage': 'string',
        'PostConfirmation': 'string',
        'PreAuthentication': 'string',
        'PostAuthentication': 'string',
        'DefineAuthChallenge': 'string',
        'CreateAuthChallenge': 'string',
        'VerifyAuthChallengeResponse': 'string'
    },
    AutoVerifiedAttributes=[
        'phone_number'|'email',
    ],
    AliasAttributes=[
        'phone_number'|'email'|'preferred_username',
    ],
    SmsVerificationMessage='string',
    EmailVerificationMessage='string',
    EmailVerificationSubject='string',
    SmsAuthenticationMessage='string',
    MfaConfiguration='OFF'|'ON'|'OPTIONAL',
    DeviceConfiguration={
        'ChallengeRequiredOnNewDevice': True|False,
        'DeviceOnlyRememberedOnUserPrompt': True|False
    },
    EmailConfiguration={
        'SourceArn': 'string',
        'ReplyToEmailAddress': 'string'
    },
    SmsConfiguration={
        'SnsCallerArn': 'string',
        'ExternalId': 'string'
    }
)
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) --

    A container with information about the user pool 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.

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.

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 SmsVerificationMessage

string

param SmsVerificationMessage

A string representing the SMS verification message.

type EmailVerificationMessage

string

param EmailVerificationMessage

A string representing the email verification message.

type EmailVerificationSubject

string

param EmailVerificationSubject

A string representing the email verification subject.

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 the email source.

  • ReplyToEmailAddress (string) --

    The REPLY-TO email address.

type SmsConfiguration

dict

param SmsConfiguration

The SMS configuration.

  • SnsCallerArn (string) --

    The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.

  • ExternalId (string) --

    The external ID.

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
            }
        },
        'LambdaConfig': {
            'PreSignUp': 'string',
            'CustomMessage': 'string',
            'PostConfirmation': 'string',
            'PreAuthentication': 'string',
            'PostAuthentication': 'string',
            'DefineAuthChallenge': 'string',
            'CreateAuthChallenge': 'string',
            'VerifyAuthChallengeResponse': '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',
        ],
        'SmsVerificationMessage': 'string',
        'EmailVerificationMessage': 'string',
        'EmailVerificationSubject': 'string',
        'SmsAuthenticationMessage': 'string',
        'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
        'DeviceConfiguration': {
            'ChallengeRequiredOnNewDevice': True|False,
            'DeviceOnlyRememberedOnUserPrompt': True|False
        },
        'EstimatedNumberOfUsers': 123,
        'EmailConfiguration': {
            'SourceArn': 'string',
            'ReplyToEmailAddress': 'string'
        },
        'SmsConfiguration': {
            'SnsCallerArn': 'string',
            'ExternalId': 'string'
        },
        'SmsConfigurationFailure': 'string',
        'EmailConfigurationFailure': 'string'
    }
}

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) --

        A container describing the policies associated with a user pool.

        • PasswordPolicy (dict) --

          A container with information about the user pool 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.

      • LambdaConfig (dict) --

        A container describing the AWS Lambda triggers associated with a 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.

      • Status (string) --

        The status of a user pool.

      • LastModifiedDate (datetime) --

        The last modified date of a user pool.

      • CreationDate (datetime) --

        The creation date of a user pool.

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

          • Mutable (boolean) --

            Specifies whether the attribute can be changed once it has been created.

          • 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 of an attribute value of the string type.

            • MaxLength (string) --

              The maximum length of an attribute value of the string type.

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

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

      • 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 the email source.

        • ReplyToEmailAddress (string) --

          The REPLY-TO email address.

      • SmsConfiguration (dict) --

        The SMS configuration.

        • SnsCallerArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.

        • ExternalId (string) --

          The external ID.

      • SmsConfigurationFailure (string) --

        The reason why the SMS configuration cannot send the message(s) to your users.

      • EmailConfigurationFailure (string) --

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

CreateUserPoolClient (updated) Link ¶
Changes (request, response)
Request
{'ExplicitAuthFlows': ['ADMIN_NO_SRP_AUTH'],
 'ReadAttributes': ['string'],
 'RefreshTokenValidity': 'integer',
 'WriteAttributes': ['string']}
Response
{'UserPoolClient': {'ExplicitAuthFlows': ['ADMIN_NO_SRP_AUTH'],
                    'ReadAttributes': ['string'],
                    'RefreshTokenValidity': 'integer',
                    'WriteAttributes': ['string']}}

Creates the user pool client.

Request Syntax

client.create_user_pool_client(
    UserPoolId='string',
    ClientName='string',
    GenerateSecret=True|False,
    RefreshTokenValidity=123,
    ReadAttributes=[
        'string',
    ],
    WriteAttributes=[
        'string',
    ],
    ExplicitAuthFlows=[
        'ADMIN_NO_SRP_AUTH',
    ]
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID for the user pool where you want to create a user pool client.

type ClientName

string

param ClientName

[REQUIRED]

The client name for the user pool client you would like to create.

type GenerateSecret

boolean

param GenerateSecret

Boolean to specify whether you want to generate a secret for the user pool client being created.

type RefreshTokenValidity

integer

param RefreshTokenValidity

Refreshes the token validity.

type ReadAttributes

list

param ReadAttributes

The read attributes.

  • (string) --

type WriteAttributes

list

param WriteAttributes

The write attributes.

  • (string) --

type ExplicitAuthFlows

list

param ExplicitAuthFlows

The explicit authentication flows.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'UserPoolClient': {
        'UserPoolId': 'string',
        'ClientName': 'string',
        'ClientId': 'string',
        'ClientSecret': 'string',
        'LastModifiedDate': datetime(2015, 1, 1),
        'CreationDate': datetime(2015, 1, 1),
        'RefreshTokenValidity': 123,
        'ReadAttributes': [
            'string',
        ],
        'WriteAttributes': [
            'string',
        ],
        'ExplicitAuthFlows': [
            'ADMIN_NO_SRP_AUTH',
        ]
    }
}

Response Structure

  • (dict) --

    Represents the response from the server to create a user pool client.

    • UserPoolClient (dict) --

      The user pool client that was just created.

      • UserPoolId (string) --

        The user pool ID for the user pool client.

      • ClientName (string) --

        The client name from the user pool request of the client type.

      • ClientId (string) --

        The ID of the client associated with the user pool.

      • ClientSecret (string) --

        The client secret from the user pool request of the client type.

      • LastModifiedDate (datetime) --

        The last modified date from the user pool request of the client type.

      • CreationDate (datetime) --

        The creation date from the user pool request of the client type.

      • RefreshTokenValidity (integer) --

        The validity of the refresh token.

      • ReadAttributes (list) --

        The Read-only attributes.

        • (string) --

      • WriteAttributes (list) --

        The writeable attributes.

        • (string) --

      • ExplicitAuthFlows (list) --

        The explicit authentication flows.

        • (string) --

DescribeUserPool (updated) Link ¶
Changes (response)
{'UserPool': {'DeviceConfiguration': {'ChallengeRequiredOnNewDevice': 'boolean',
                                      'DeviceOnlyRememberedOnUserPrompt': 'boolean'},
              'EmailConfiguration': {'ReplyToEmailAddress': 'string',
                                     'SourceArn': 'string'},
              'EmailConfigurationFailure': 'string',
              'LambdaConfig': {'CreateAuthChallenge': 'string',
                               'DefineAuthChallenge': 'string',
                               'VerifyAuthChallengeResponse': 'string'},
              'SmsConfiguration': {'ExternalId': 'string',
                                   'SnsCallerArn': 'string'},
              'SmsConfigurationFailure': 'string'}}

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

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
            }
        },
        'LambdaConfig': {
            'PreSignUp': 'string',
            'CustomMessage': 'string',
            'PostConfirmation': 'string',
            'PreAuthentication': 'string',
            'PostAuthentication': 'string',
            'DefineAuthChallenge': 'string',
            'CreateAuthChallenge': 'string',
            'VerifyAuthChallengeResponse': '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',
        ],
        'SmsVerificationMessage': 'string',
        'EmailVerificationMessage': 'string',
        'EmailVerificationSubject': 'string',
        'SmsAuthenticationMessage': 'string',
        'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
        'DeviceConfiguration': {
            'ChallengeRequiredOnNewDevice': True|False,
            'DeviceOnlyRememberedOnUserPrompt': True|False
        },
        'EstimatedNumberOfUsers': 123,
        'EmailConfiguration': {
            'SourceArn': 'string',
            'ReplyToEmailAddress': 'string'
        },
        'SmsConfiguration': {
            'SnsCallerArn': 'string',
            'ExternalId': 'string'
        },
        'SmsConfigurationFailure': 'string',
        'EmailConfigurationFailure': 'string'
    }
}

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) --

        A container describing the policies associated with a user pool.

        • PasswordPolicy (dict) --

          A container with information about the user pool 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.

      • LambdaConfig (dict) --

        A container describing the AWS Lambda triggers associated with a 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.

      • Status (string) --

        The status of a user pool.

      • LastModifiedDate (datetime) --

        The last modified date of a user pool.

      • CreationDate (datetime) --

        The creation date of a user pool.

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

          • Mutable (boolean) --

            Specifies whether the attribute can be changed once it has been created.

          • 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 of an attribute value of the string type.

            • MaxLength (string) --

              The maximum length of an attribute value of the string type.

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

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

      • 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 the email source.

        • ReplyToEmailAddress (string) --

          The REPLY-TO email address.

      • SmsConfiguration (dict) --

        The SMS configuration.

        • SnsCallerArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.

        • ExternalId (string) --

          The external ID.

      • SmsConfigurationFailure (string) --

        The reason why the SMS configuration cannot send the message(s) to your users.

      • EmailConfigurationFailure (string) --

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

DescribeUserPoolClient (updated) Link ¶
Changes (response)
{'UserPoolClient': {'ExplicitAuthFlows': ['ADMIN_NO_SRP_AUTH'],
                    'ReadAttributes': ['string'],
                    'RefreshTokenValidity': 'integer',
                    'WriteAttributes': ['string']}}

Client method for returning the configuration information and metadata of the specified user pool client.

Request Syntax

client.describe_user_pool_client(
    UserPoolId='string',
    ClientId='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

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

type ClientId

string

param ClientId

[REQUIRED]

The ID of the client associated with the user pool.

rtype

dict

returns

Response Syntax

{
    'UserPoolClient': {
        'UserPoolId': 'string',
        'ClientName': 'string',
        'ClientId': 'string',
        'ClientSecret': 'string',
        'LastModifiedDate': datetime(2015, 1, 1),
        'CreationDate': datetime(2015, 1, 1),
        'RefreshTokenValidity': 123,
        'ReadAttributes': [
            'string',
        ],
        'WriteAttributes': [
            'string',
        ],
        'ExplicitAuthFlows': [
            'ADMIN_NO_SRP_AUTH',
        ]
    }
}

Response Structure

  • (dict) --

    Represents the response from the server from a request to describe the user pool client.

    • UserPoolClient (dict) --

      The user pool client from a server response to describe the user pool client.

      • UserPoolId (string) --

        The user pool ID for the user pool client.

      • ClientName (string) --

        The client name from the user pool request of the client type.

      • ClientId (string) --

        The ID of the client associated with the user pool.

      • ClientSecret (string) --

        The client secret from the user pool request of the client type.

      • LastModifiedDate (datetime) --

        The last modified date from the user pool request of the client type.

      • CreationDate (datetime) --

        The creation date from the user pool request of the client type.

      • RefreshTokenValidity (integer) --

        The validity of the refresh token.

      • ReadAttributes (list) --

        The Read-only attributes.

        • (string) --

      • WriteAttributes (list) --

        The writeable attributes.

        • (string) --

      • ExplicitAuthFlows (list) --

        The explicit authentication flows.

        • (string) --

ListUserPools (updated) Link ¶
Changes (response)
{'UserPools': {'LambdaConfig': {'CreateAuthChallenge': 'string',
                                'DefineAuthChallenge': 'string',
                                'VerifyAuthChallengeResponse': 'string'}}}

Lists the user pools associated with an AWS account.

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'
            },
            '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.

        • Status (string) --

          The user pool status in a user pool description.

        • LastModifiedDate (datetime) --

          The last modified date in a user pool description.

        • CreationDate (datetime) --

          The creation date in a user pool description.

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

ListUsers (updated) Link ¶
Changes (request, response)
Request
{'Filter': 'string'}
Response
{'Users': {'UserStatus': ['RESET_REQUIRED']}}

Lists the users in the Amazon Cognito user pool.

Request Syntax

client.list_users(
    UserPoolId='string',
    AttributesToGet=[
        'string',
    ],
    Limit=123,
    PaginationToken='string',
    Filter='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The user pool ID for which you want to list users.

type AttributesToGet

list

param AttributesToGet

The attributes to get from the request to list users.

  • (string) --

type Limit

integer

param Limit

The limit of the request to list users.

type PaginationToken

string

param PaginationToken

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 Filter

string

param Filter

The filter for the list users request.

rtype

dict

returns

Response Syntax

{
    'Users': [
        {
            'Username': 'string',
            'Attributes': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'UserCreateDate': datetime(2015, 1, 1),
            'UserLastModifiedDate': datetime(2015, 1, 1),
            'Enabled': True|False,
            'UserStatus': 'UNCONFIRMED'|'CONFIRMED'|'ARCHIVED'|'COMPROMISED'|'UNKNOWN'|'RESET_REQUIRED'
        },
    ],
    'PaginationToken': 'string'
}

Response Structure

  • (dict) --

    The response from the request to list users.

    • Users (list) --

      The users returned in the request to list users.

      • (dict) --

        The user type.

        • Username (string) --

          The user name of the user you wish to describe.

        • Attributes (list) --

          A container with information about the user type attributes.

          • (dict) --

            Specifies whether the attribute is standard or custom.

            • Name (string) --

              The name of the attribute.

            • Value (string) --

              The value of the attribute.

        • UserCreateDate (datetime) --

          The creation date of the user.

        • UserLastModifiedDate (datetime) --

          The last modified date of the user.

        • Enabled (boolean) --

          Specifies whether the user is enabled.

        • UserStatus (string) --

          The user status. Can be one of the following:

          • UNCONFIRMED - User has been created but not confirmed.

          • CONFIRMED - User has been confirmed.

          • ARCHIVED - User is no longer active.

          • COMPROMISED - User is disabled due to a potential security threat.

          • UNKNOWN - User status is not known.

    • PaginationToken (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)
{'DeviceConfiguration': {'ChallengeRequiredOnNewDevice': 'boolean',
                         'DeviceOnlyRememberedOnUserPrompt': 'boolean'},
 'EmailConfiguration': {'ReplyToEmailAddress': 'string', 'SourceArn': 'string'},
 'LambdaConfig': {'CreateAuthChallenge': 'string',
                  'DefineAuthChallenge': 'string',
                  'VerifyAuthChallengeResponse': 'string'},
 'SmsConfiguration': {'ExternalId': 'string', 'SnsCallerArn': 'string'}}

Updates the specified user pool with the specified attributes.

Request Syntax

client.update_user_pool(
    UserPoolId='string',
    Policies={
        'PasswordPolicy': {
            'MinimumLength': 123,
            'RequireUppercase': True|False,
            'RequireLowercase': True|False,
            'RequireNumbers': True|False,
            'RequireSymbols': True|False
        }
    },
    LambdaConfig={
        'PreSignUp': 'string',
        'CustomMessage': 'string',
        'PostConfirmation': 'string',
        'PreAuthentication': 'string',
        'PostAuthentication': 'string',
        'DefineAuthChallenge': 'string',
        'CreateAuthChallenge': 'string',
        'VerifyAuthChallengeResponse': 'string'
    },
    AutoVerifiedAttributes=[
        'phone_number'|'email',
    ],
    SmsVerificationMessage='string',
    EmailVerificationMessage='string',
    EmailVerificationSubject='string',
    SmsAuthenticationMessage='string',
    MfaConfiguration='OFF'|'ON'|'OPTIONAL',
    DeviceConfiguration={
        'ChallengeRequiredOnNewDevice': True|False,
        'DeviceOnlyRememberedOnUserPrompt': True|False
    },
    EmailConfiguration={
        'SourceArn': 'string',
        'ReplyToEmailAddress': 'string'
    },
    SmsConfiguration={
        'SnsCallerArn': 'string',
        'ExternalId': 'string'
    }
)
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) --

    A container with information about the user pool 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.

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.

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 verfication message

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 the email source.

  • ReplyToEmailAddress (string) --

    The REPLY-TO email address.

type SmsConfiguration

dict

param SmsConfiguration

SMS configuration.

  • SnsCallerArn (string) --

    The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.

  • ExternalId (string) --

    The external ID.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

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

UpdateUserPoolClient (updated) Link ¶
Changes (request, response)
Request
{'ExplicitAuthFlows': ['ADMIN_NO_SRP_AUTH'],
 'ReadAttributes': ['string'],
 'RefreshTokenValidity': 'integer',
 'WriteAttributes': ['string']}
Response
{'UserPoolClient': {'ExplicitAuthFlows': ['ADMIN_NO_SRP_AUTH'],
                    'ReadAttributes': ['string'],
                    'RefreshTokenValidity': 'integer',
                    'WriteAttributes': ['string']}}

Allows the developer to update the specified user pool client and password policy.

Request Syntax

client.update_user_pool_client(
    UserPoolId='string',
    ClientId='string',
    ClientName='string',
    RefreshTokenValidity=123,
    ReadAttributes=[
        'string',
    ],
    WriteAttributes=[
        'string',
    ],
    ExplicitAuthFlows=[
        'ADMIN_NO_SRP_AUTH',
    ]
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

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

type ClientId

string

param ClientId

[REQUIRED]

The ID of the client associated with the user pool.

type ClientName

string

param ClientName

The client name from the update user pool client request.

type RefreshTokenValidity

integer

param RefreshTokenValidity

The validity of the refresh token.

type ReadAttributes

list

param ReadAttributes

The read-only attributes of the user pool.

  • (string) --

type WriteAttributes

list

param WriteAttributes

The writeable attributes of the user pool.

  • (string) --

type ExplicitAuthFlows

list

param ExplicitAuthFlows

Explicit authentication flows.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'UserPoolClient': {
        'UserPoolId': 'string',
        'ClientName': 'string',
        'ClientId': 'string',
        'ClientSecret': 'string',
        'LastModifiedDate': datetime(2015, 1, 1),
        'CreationDate': datetime(2015, 1, 1),
        'RefreshTokenValidity': 123,
        'ReadAttributes': [
            'string',
        ],
        'WriteAttributes': [
            'string',
        ],
        'ExplicitAuthFlows': [
            'ADMIN_NO_SRP_AUTH',
        ]
    }
}

Response Structure

  • (dict) --

    Represents the response from the server to the request to update the user pool client.

    • UserPoolClient (dict) --

      The user pool client value from the response from the server when an update user pool client request is made.

      • UserPoolId (string) --

        The user pool ID for the user pool client.

      • ClientName (string) --

        The client name from the user pool request of the client type.

      • ClientId (string) --

        The ID of the client associated with the user pool.

      • ClientSecret (string) --

        The client secret from the user pool request of the client type.

      • LastModifiedDate (datetime) --

        The last modified date from the user pool request of the client type.

      • CreationDate (datetime) --

        The creation date from the user pool request of the client type.

      • RefreshTokenValidity (integer) --

        The validity of the refresh token.

      • ReadAttributes (list) --

        The Read-only attributes.

        • (string) --

      • WriteAttributes (list) --

        The writeable attributes.

        • (string) --

      • ExplicitAuthFlows (list) --

        The explicit authentication flows.

        • (string) --