File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ import { EventConsumer } from './eventConsumer';
66import { EventProducer } from './eventProducer' ;
77import { EventRouter } from './eventRouter' ;
88import { Queue } from 'aws-cdk-lib/aws-sqs' ;
9+ import { EventDashboard } from './eventDashboard' ;
10+ import { EventAlarms } from './eventAlarms' ;
911
1012export 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}
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments