CognitoIdentityProvider / Client / set_log_delivery_configuration

set_log_delivery_configuration#

CognitoIdentityProvider.Client.set_log_delivery_configuration(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

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

  • LogConfigurations (list) –

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

          To send logs to log groups with a resource policy of a size greater than 5120 characters, configure a log group with a path that starts with /aws/vendedlogs. For more information, see Enabling logging from certain Amazon Web Services services.

Return type:

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.

              To send logs to log groups with a resource policy of a size greater than 5120 characters, configure a log group with a path that starts with /aws/vendedlogs. For more information, see Enabling logging from certain Amazon Web Services services.

Exceptions

  • CognitoIdentityProvider.Client.exceptions.InvalidParameterException

  • CognitoIdentityProvider.Client.exceptions.InternalErrorException

  • CognitoIdentityProvider.Client.exceptions.TooManyRequestsException

  • CognitoIdentityProvider.Client.exceptions.NotAuthorizedException

  • CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException