cloudwatch-auto-retention
Version:
CloudWatch Auto Retention is a construct that creates a Lambda with a cronjob that checks whether CloudWatch loggroups are set to never-expire. If so, the construct sets it to one month.
27 lines (26 loc) • 621 B
TypeScript
import { Schedule } from 'aws-cdk-lib/aws-events';
import { RetentionDays } from 'aws-cdk-lib/aws-logs';
import { Construct } from 'constructs';
/**
* @stability stable
*/
export interface CloudwatchAutoRetentionProps {
/**
* @stability stable
*/
readonly schedule?: Schedule;
/**
* @stability stable
*/
readonly retention?: RetentionDays;
}
/**
* @stability stable
*/
export declare class CloudwatchAutoRetention extends Construct {
private props;
/**
* @stability stable
*/
constructor(scope: Construct, id: string, props?: CloudwatchAutoRetentionProps);
}