Skip to main content

logging_status

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

Overview

Namelogging_status
TypeResource
Idaws.redshift.logging_status

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bucket_namestringThe name of the S3 bucket where the log files are stored.
last_failure_messagestringThe message indicating that logs failed to be delivered.
last_failure_timestringThe last time when logs failed to be delivered.
last_successful_delivery_timestringThe last time that logs were delivered.
log_destination_typestringThe log destination type. An enum with possible values of s3, cloudwatch, and s3table.
log_exportsstringThe collection of exported log types. When LogDestinationType is s3 or cloudwatch, possible values are connectionlog, useractivitylog, and userlog. When LogDestinationType is s3table, the values are the names of the system tables being published.
logging_enabledbooleantrue if logging is on, false if logging is off.
s3_key_prefixstringThe prefix applied to the log file names.
s3_tablesstringThe status of system table publishing to S3 Tables. This field is populated only when system table publishing is active.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_logging_statusselectClusterIdentifier, regionDescribes whether information, such as queries and connection attempts, is being logged for the specified Amazon Redshift cluster.

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
ClusterIdentifierstringThe identifier of the cluster from which to get the logging status. Example: examplecluster
regionstringAWS region (default: us-east-1)

SELECT examples

Describes whether information, such as queries and connection attempts, is being logged for the specified Amazon Redshift cluster.

SELECT
bucket_name,
last_failure_message,
last_failure_time,
last_successful_delivery_time,
log_destination_type,
log_exports,
logging_enabled,
s3_key_prefix,
s3_tables
FROM aws.redshift.logging_status
WHERE ClusterIdentifier = '{{ ClusterIdentifier }}' -- required
AND region = '{{ region }}' -- required
;