Skip to main content

log_delivery_configurations

Creates, updates, deletes, gets or lists a log_delivery_configurations resource.

Overview

Namelog_delivery_configurations
TypeResource
Idaws.cognito_idp.log_delivery_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
log_configurationsarrayA logging destination of a user pool. User pools can have multiple logging destinations for message-delivery and user-activity logs.
user_pool_idstringThe ID of the user pool where you configured logging. (pattern: <code>[\w-]+_[0-9a-zA-Z]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_log_delivery_configurationselectregionGiven 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. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
set_log_delivery_configurationupdateregion, UserPoolId, LogConfigurationsSets up or modifies the logging configuration of a user pool. User pools can export user notification logs and, when threat protection is active, user-activity logs. For more information, see Exporting user pool logs.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints

SELECT
log_configurations,
user_pool_id
FROM aws.cognito_idp.log_delivery_configurations
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Sets up or modifies the logging configuration of a user pool. User pools can export user notification logs and, when threat protection is active, user-activity logs. For more information, see Exporting user pool logs.

UPDATE aws.cognito_idp.log_delivery_configurations
SET
UserPoolId = '{{ UserPoolId }}',
LogConfigurations = '{{ LogConfigurations }}'
WHERE
region = '{{ region }}' --required
AND UserPoolId = '{{ UserPoolId }}' --required
AND LogConfigurations = '{{ LogConfigurations }}' --required
RETURNING
log_delivery_configuration;