Amazon Cognito Identity Provider

2023/08/02 - Amazon Cognito Identity Provider - 2 new api methods

Changes  New feature that logs Cognito user pool error messages to CloudWatch logs.

GetLogDeliveryConfiguration (new) Link ¶

Gets the detailed activity logging configuration for a user pool.

See also: AWS API Documentation

Request Syntax

client.get_log_delivery_configuration(
    UserPoolId='string'
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The ID of the user pool where you want to view detailed activity logging configuration.

rtype

dict

returns

Response Syntax

{
    'LogDeliveryConfiguration': {
        'UserPoolId': 'string',
        'LogConfigurations': [
            {
                'LogLevel': 'ERROR',
                'EventSource': 'userNotification',
                'CloudWatchLogsConfiguration': {
                    'LogGroupArn': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LogDeliveryConfiguration (dict) --

      The detailed activity logging configuration of the requested user pool.

      • UserPoolId (string) --

        The ID of the user pool where you configured detailed activity logging.

      • LogConfigurations (list) --

        The detailed activity logging destination of a user pool.

        • (dict) --

          The logging parameters of a user pool.

          • LogLevel (string) --

            The errorlevel selection of logs that a user pool sends for detailed activity logging.

          • EventSource (string) --

            The source of events that your user pool sends for detailed activity logging.

          • CloudWatchLogsConfiguration (dict) --

            The CloudWatch logging destination of a user pool.

            • LogGroupArn (string) --

              The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user pool sends logs. The log group must not be encrypted with Key Management Service and must be in the same Amazon Web Services account as your user pool.

SetLogDeliveryConfiguration (new) Link ¶

Sets up or modifies the detailed activity logging configuration of a user pool.

See also: AWS API Documentation

Request Syntax

client.set_log_delivery_configuration(
    UserPoolId='string',
    LogConfigurations=[
        {
            'LogLevel': 'ERROR',
            'EventSource': 'userNotification',
            'CloudWatchLogsConfiguration': {
                'LogGroupArn': 'string'
            }
        },
    ]
)
type UserPoolId

string

param UserPoolId

[REQUIRED]

The ID of the user pool where you want to configure detailed activity logging .

type LogConfigurations

list

param LogConfigurations

[REQUIRED]

A collection of all of the detailed activity logging configurations for a user pool.

  • (dict) --

    The logging parameters of a user pool.

    • LogLevel (string) -- [REQUIRED]

      The errorlevel selection of logs that a user pool sends for detailed activity logging.

    • EventSource (string) -- [REQUIRED]

      The source of events that your user pool sends for detailed activity logging.

    • CloudWatchLogsConfiguration (dict) --

      The CloudWatch logging destination of a user pool.

      • LogGroupArn (string) --

        The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user pool sends logs. The log group must not be encrypted with Key Management Service and must be in the same Amazon Web Services account as your user pool.

rtype

dict

returns

Response Syntax

{
    'LogDeliveryConfiguration': {
        'UserPoolId': 'string',
        'LogConfigurations': [
            {
                'LogLevel': 'ERROR',
                'EventSource': 'userNotification',
                'CloudWatchLogsConfiguration': {
                    'LogGroupArn': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LogDeliveryConfiguration (dict) --

      The detailed activity logging configuration that you applied to the requested user pool.

      • UserPoolId (string) --

        The ID of the user pool where you configured detailed activity logging.

      • LogConfigurations (list) --

        The detailed activity logging destination of a user pool.

        • (dict) --

          The logging parameters of a user pool.

          • LogLevel (string) --

            The errorlevel selection of logs that a user pool sends for detailed activity logging.

          • EventSource (string) --

            The source of events that your user pool sends for detailed activity logging.

          • CloudWatchLogsConfiguration (dict) --

            The CloudWatch logging destination of a user pool.

            • LogGroupArn (string) --

              The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user pool sends logs. The log group must not be encrypted with Key Management Service and must be in the same Amazon Web Services account as your user pool.