Skip to content

Commit

Permalink
add removal policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Wang committed Sep 23, 2024
1 parent a9fa9b6 commit c648bf5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { App, Stack } from 'aws-cdk-lib';
import { App, RemovalPolicy, Stack } from 'aws-cdk-lib';
import { LogGroup } from 'aws-cdk-lib/aws-logs';

const app = new App();
const stack = new Stack(app, 'aws-cdk-log-group-metrics');

const logGroup = new LogGroup(stack, 'MyLogGroup', {
logGroupName: 'my-log-group',
removalPolicy: RemovalPolicy.DESTROY,
});

logGroup.metricIncomingBytes().createAlarm(stack, 'IncomingBytesPerInstanceAlarm', {
Expand Down

0 comments on commit c648bf5

Please sign in to comment.