import * as s3 from 'aws-cdk-lib/aws-s3'; import { Construct } from 'constructs'; /** * Configuration options for the AccessLog construct */ export interface AccessLogProps { /** * The name of the S3 bucket for access logs * @default 'access-logs' */ readonly bucketName?: string; /** * Lifecycle rules for the access logs * @default Transition to IA after 30 days, delete after 90 days */ readonly lifecycleRules?: s3.LifecycleRule[]; /** * Whether to enable versioning on the access logs bucket * @default false */ readonly versioned?: boolean; /** * Custom bucket prefix for organizing access logs * @default 'access-logs' */ readonly bucketPrefix?: string; } /** * AccessLog construct that provides a centralized S3 bucket for storing access logs. * This construct creates a secure S3 bucket with appropriate policies for AWS services * to deliver access logs. * * Usage: * * const accessLog = new AccessLog(this, 'AccessLog'); * const bucket = accessLog.bucket; * const bucketName = accessLog.bucketName; */ export declare class AccessLog extends Construct { /** * The S3 bucket for storing access logs */ readonly bucket: s3.Bucket; /** * The name of the S3 bucket */ readonly bucketName: string; /** * The bucket prefix used for organizing access logs */ readonly bucketPrefix: string; constructor(scope: Construct, id: string, props?: AccessLogProps); /** * Get the S3 bucket path for a specific service's access logs * * @param serviceName The name of the service (e.g., 'alb', 'cloudfront', 's3') * @param resourceName Optional resource name for further organization * @returns The S3 path for the service's access logs */ getLogPath(serviceName: string, resourceName?: string): string; /** * Get the S3 URI for a specific service's access logs * * @param serviceName The name of the service (e.g., 'alb', 'cloudfront', 's3') * @param resourceName Optional resource name for further organization * @returns The S3 URI for the service's access logs */ getLogUri(serviceName: string, resourceName?: string): string; }