CognitoIdentityProvider / Client / get_log_delivery_configuration

get_log_delivery_configuration#

CognitoIdentityProvider.Client.get_log_delivery_configuration(**kwargs)#

Given a user pool ID, returns the logging configuration. User pools can export message-delivery error and threat-protection activity logs to external Amazon Web Services services. For more information, see Exporting user pool logs.

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.get_log_delivery_configuration(
    UserPoolId='string'
)
Parameters:

UserPoolId (string) –

[REQUIRED]

The ID of the user pool that has the logging configuration that you want to view.

Return type:

dict

Returns:

Response Syntax

{
    'LogDeliveryConfiguration': {
        'UserPoolId': 'string',
        'LogConfigurations': [
            {
                'LogLevel': 'ERROR'|'INFO',
                'EventSource': 'userNotification'|'userAuthEvents',
                'CloudWatchLogsConfiguration': {
                    'LogGroupArn': 'string'
                },
                'S3Configuration': {
                    'BucketArn': 'string'
                },
                'FirehoseConfiguration': {
                    'StreamArn': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) –

    • LogDeliveryConfiguration (dict) –

      The logging configuration of the requested user pool. Includes types of logs configured and their destinations.

      • UserPoolId (string) –

        The ID of the user pool where you configured logging.

      • LogConfigurations (list) –

        A logging destination of a user pool. User pools can have multiple logging destinations for message-delivery and user-activity logs.

        • (dict) –

          The configuration of user event logs to an external Amazon Web Services service like Amazon Data Firehose, Amazon S3, or Amazon CloudWatch Logs.

          • LogLevel (string) –

            The errorlevel selection of logs that a user pool sends for detailed activity logging. To send userNotification activity with information about message delivery, choose ERROR with CloudWatchLogsConfiguration. To send userAuthEvents activity with user logs from threat protection with the Plus feature plan, choose INFO with one of CloudWatchLogsConfiguration, FirehoseConfiguration, or S3Configuration.

          • EventSource (string) –

            The source of events that your user pool sends for logging. To send error-level logs about user notification activity, set to userNotification. To send info-level logs about threat-protection user activity in user pools with the Plus feature plan, set to userAuthEvents.

          • CloudWatchLogsConfiguration (dict) –

            The CloudWatch log group destination of user pool detailed activity logs, or of user activity log export with threat protection.

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

          • S3Configuration (dict) –

            The Amazon S3 bucket destination of user activity log export with threat protection. To activate this setting, your user pool must be on the Plus tier.

            • BucketArn (string) –

              The ARN of an Amazon S3 bucket that’s the destination for threat protection log export.

          • FirehoseConfiguration (dict) –

            The Amazon Data Firehose stream destination of user activity log export with threat protection. To activate this setting, your user pool must be on the Plus tier.

            • StreamArn (string) –

              The ARN of an Amazon Data Firehose stream that’s the destination for threat protection log export.

Exceptions

  • CognitoIdentityProvider.Client.exceptions.InvalidParameterException

  • CognitoIdentityProvider.Client.exceptions.InternalErrorException

  • CognitoIdentityProvider.Client.exceptions.TooManyRequestsException

  • CognitoIdentityProvider.Client.exceptions.NotAuthorizedException

  • CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException