Skip to content

Commit f1a6b9a

Browse files
committed
chore: Create stubs for dashboards and alarms
1 parent 75d4cf1 commit f1a6b9a

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

lib/cell-stack.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ import { EventConsumer } from './eventConsumer';
66
import { EventProducer } from './eventProducer';
77
import { EventRouter } from './eventRouter';
88
import { Queue } from 'aws-cdk-lib/aws-sqs';
9+
import { EventDashboard } from './eventDashboard';
10+
import { EventAlarms } from './eventAlarms';
911

1012
export class CellStack extends cdk.Stack {
1113
router: EventRouter;
1214
producer: EventProducer;
1315
consumers: EventConsumer[] = [];
16+
dashboard: EventDashboard;
17+
alarms: EventAlarms;
1418

1519
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
1620
super(scope, id, props);
@@ -36,5 +40,9 @@ export class CellStack extends cdk.Stack {
3640
deadLetterQueue: new Queue(this, consumer.node.id + consumer.type + 'DeadLetterQueue')
3741
}));
3842
});
43+
44+
// create Dashboards and Alarms
45+
this.dashboard = new EventDashboard(this, id + 'Dashboard');
46+
this.alarms = new EventAlarms(this, id + 'Alarms');
3947
}
4048
}

lib/eventAlarms.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import * as cdk from 'aws-cdk-lib';
2+
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
3+
import { Construct } from 'constructs';
4+
5+
export interface EventAlarmsProps {
6+
// Define your custom properties here
7+
}
8+
9+
export class EventAlarms extends Construct {
10+
// Public properties
11+
public readonly alarms: cloudwatch.Alarm[];
12+
13+
constructor(scope: Construct, id: string, props?: EventAlarmsProps) {
14+
super(scope, id);
15+
16+
this.alarms = [];
17+
// Initialize your construct logic here
18+
}
19+
20+
// Add helper methods for creating different types of alarms
21+
private createAlarm(/* params */): cloudwatch.Alarm {
22+
// Implement alarm creation logic
23+
return new cloudwatch.Alarm(this, 'Alarm', {
24+
// Add alarm properties
25+
});
26+
}
27+
}

lib/eventDashboard.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import * as cdk from 'aws-cdk-lib';
2+
import { Construct } from 'constructs';
3+
4+
export interface EventDashboardProps {
5+
// Define your custom properties here
6+
}
7+
8+
export class EventDashboard extends Construct {
9+
// Public properties
10+
public readonly dashboardName: string;
11+
12+
constructor(scope: Construct, id: string, props?: EventDashboardProps) {
13+
super(scope, id);
14+
15+
// Initialize your construct logic here
16+
}
17+
18+
// Add any helper methods here
19+
}

0 commit comments

Comments
 (0)