log_delivery_configurations
Creates, updates, deletes, gets or lists a log_delivery_configurations resource.
Overview
| Name | log_delivery_configurations |
| Type | Resource |
| Id | aws.cognito_idp.log_delivery_configurations |
Fields
The following fields are returned by SELECT queries:
- get_log_delivery_configuration
| Name | Datatype | Description |
|---|---|---|
log_configurations | array | A logging destination of a user pool. User pools can have multiple logging destinations for message-delivery and user-activity logs. |
user_pool_id | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_log_delivery_configuration | select | region | 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 | |
set_log_delivery_configuration | update | region, UserPoolId, LogConfigurations | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_log_delivery_configuration
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
- set_log_delivery_configuration
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;