ClusterLogging

class aws_cdk.aws_redshift_alpha.ClusterLogging

Bases: object

(experimental) The logging configuration for a Redshift cluster.

Stability:

experimental

ExampleMetadata:

infused

Example:

from aws_cdk.aws_redshift_alpha import Login
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_s3 as s3
from aws_cdk.aws_redshift_alpha import ClusterLogging

# vpc: ec2.IVpc
# bucket: s3.IBucket


cluster = Cluster(self, "Redshift",
    master_user=Login(
        master_username="admin"
    ),
    vpc=vpc,
    logging=ClusterLogging.s3(
        bucket=bucket,
        key_prefix="redshift-logs/"
    )
)
Stability:

experimental

Static Methods

classmethod cloud_watch(*, log_exports=None)

(experimental) Send logs to CloudWatch.

Parameters:

log_exports (Optional[Sequence[LogExport]]) – (experimental) The types of logs to export. Default: - [LogExport.CONNECTION_LOG, LogExport.USER_LOG, LogExport.USER_ACTIVITY_LOG]

Stability:

experimental

Return type:

ClusterLogging

classmethod s3(*, bucket, key_prefix=None)

(experimental) Send logs to S3.

Parameters:
  • bucket (IBucket) – (experimental) The S3 bucket where the log files are stored.

  • key_prefix (Optional[str]) – (experimental) The prefix applied to the log file names. Default: - No prefix

Stability:

experimental

Return type:

ClusterLogging