CognitoIdentityProvider / Client / get_user_pool_session_configuration

get_user_pool_session_configuration

CognitoIdentityProvider.Client.get_user_pool_session_configuration(**kwargs)

Retrieves the session tracking configuration for a user pool, including whether session tracking is enabled and the pool-wide maximum number of active token sessions for each user. If you have never called SetUserPoolSessionConfiguration for the user pool, this operation returns the default values: UserSessionTracking as DISABLED and a MaxPerUser value of 20.

See also: AWS API Documentation

Request Syntax

response = client.get_user_pool_session_configuration(
    UserPoolId='string'
)
Parameters:

UserPoolId (string) –

[REQUIRED]

The ID of the user pool where you want to retrieve the session configuration.

Return type:

dict

Returns:

Response Syntax

{
    'UserPoolId': 'string',
    'UserSessionTracking': 'ENABLED'|'DISABLED',
    'TokenSession': {
        'MaxPerUser': 123
    }
}

Response Structure

  • (dict) –

    • UserPoolId (string) –

      The ID of the user pool that the session configuration applies to.

    • UserSessionTracking (string) –

      Indicates whether session tracking is enabled for the user pool.

    • TokenSession (dict) –

      The pool-wide token session settings for the user pool.

      • MaxPerUser (integer) –

        The maximum number of active token sessions that a user can have across the user pool. The minimum value is 1 and the maximum value is 100. The default is 20. When a user reaches this limit, the next successful authentication automatically evicts that user’s least recently used token session before it creates the new session. Lowering this value doesn’t evict existing sessions on its own; the user is brought back within the limit on their next sign-in.

Exceptions