@composurecdk/cloudwatch 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,6 +59,39 @@ const alarms = createAlarms(scope, "MyFunction", definitions);
59
59
 
60
60
  Construct IDs follow the pattern `${id}${Capitalize(key)}Alarm` (e.g., `MyFunctionErrorsAlarm`).
61
61
 
62
+ ## alarmActionsPolicy
63
+
64
+ A [Policy](../../docs/adr/0002-policies.md) that routes CloudWatch alarm actions (e.g. SNS notifications) to every `Alarm` and `CompositeAlarm` in a construct subtree. Install it once on an `App` or `Stack` and it applies to every alarm the subtree produces — including alarms created later by builders or nested composed systems.
65
+
66
+ ```ts
67
+ import { alarmActionsPolicy } from "@composurecdk/cloudwatch";
68
+ import { SnsAction } from "aws-cdk-lib/aws-cloudwatch-actions";
69
+
70
+ alarmActionsPolicy(app, {
71
+ defaults: { alarmActions: [new SnsAction(alertsTopic)] },
72
+ });
73
+ ```
74
+
75
+ Per-alarm routing is expressed as rules. Matchers can be a substring (tested against both the alarm's `id` and `path`), a `RegExp` (tested against `path`), or a predicate receiving the full match context. Rules append actions on top of `defaults`; set `replaceDefaults: true` on a rule to suppress defaults for its matched alarms.
76
+
77
+ ```ts
78
+ alarmActionsPolicy(app, {
79
+ defaults: { alarmActions: [new SnsAction(standardTopic)] },
80
+ rules: [
81
+ { match: "HighSev", alarmActions: [new SnsAction(pagerTopic)] },
82
+ { match: /Composite$/, compositeOnly: true, alarmActions: [new SnsAction(execTopic)] },
83
+ ],
84
+ });
85
+ ```
86
+
87
+ All three action states are supported: `alarmActions`, `okActions`, and `insufficientDataActions`.
88
+
89
+ The policy is implemented as a CDK [Aspect](https://docs.aws.amazon.com/cdk/v2/guide/aspects.html) — it has no dependency on `@composurecdk/core` and works in any CDK app. Because aspects fire during synth, the policy can be registered before or after the alarms it targets. The only constraint is that any `IAlarmAction` instances in the config (e.g. `new SnsAction(topic)`) must reference constructs that already exist when the policy is called.
90
+
91
+ ### Limitation: L2 alarms only
92
+
93
+ Only L2 `Alarm` and `CompositeAlarm` constructs are covered. Bare `CfnAlarm` / `CfnCompositeAlarm` nodes (created directly without the L2 wrapper) are silently skipped. In practice this is rare — the ComposureCDK alarm builders and aws-cdk-lib's own L2 APIs always create the wrapper — but if you hand-write L1 alarms, actions must be attached manually.
94
+
62
95
  ## AlarmDefinition
63
96
 
64
97
  The fully-resolved alarm descriptor consumed by `createAlarms`. All fields are required — this is the canonical form after defaults and overrides have been merged.
package/dist/index.d.ts CHANGED
@@ -3,4 +3,6 @@ export type { AlarmDefinition } from "./alarm-definition.js";
3
3
  export { AlarmDefinitionBuilder } from "./alarm-definition-builder.js";
4
4
  export { createAlarms } from "./create-alarms.js";
5
5
  export { resolveAlarmConfig, type ResolvedAlarmConfig } from "./resolve-alarm-config.js";
6
+ export { alarmActionsPolicy } from "./policies/alarm-actions-policy.js";
7
+ export type { AlarmActionsPolicyConfig, AlarmMatchContext, } from "./policies/alarm-actions-policy.js";
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,YAAY,EACV,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { AlarmDefinitionBuilder } from "./alarm-definition-builder.js";
2
2
  export { createAlarms } from "./create-alarms.js";
3
3
  export { resolveAlarmConfig } from "./resolve-alarm-config.js";
4
+ export { alarmActionsPolicy } from "./policies/alarm-actions-policy.js";
4
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAA4B,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAA4B,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { CfnAlarm, CfnCompositeAlarm, type IAlarm, type IAlarmAction } from "aws-cdk-lib/aws-cloudwatch";
2
+ import { type IConstruct } from "constructs";
3
+ /**
4
+ * Selects which alarms a rule applies to.
5
+ *
6
+ * - `string` — substring match against the alarm's `id` OR `path`.
7
+ * - `RegExp` — tested against `path`.
8
+ * - predicate — receives the full {@link AlarmMatchContext}.
9
+ */
10
+ export type AlarmMatcher = string | RegExp | ((ctx: AlarmMatchContext) => boolean);
11
+ /**
12
+ * Context passed to matcher predicates and derived for every visited alarm.
13
+ *
14
+ * `id` and `path` come from the L2 alarm when one is present, otherwise from
15
+ * the L1 `CfnAlarm` / `CfnCompositeAlarm`.
16
+ */
17
+ export interface AlarmMatchContext {
18
+ readonly alarm: IAlarm | undefined;
19
+ readonly cfn: CfnAlarm | CfnCompositeAlarm;
20
+ readonly id: string;
21
+ readonly path: string;
22
+ readonly isComposite: boolean;
23
+ }
24
+ /** A set of actions, one array per alarm state. All arrays are optional. */
25
+ export interface AlarmActionSet {
26
+ alarmActions?: IAlarmAction[];
27
+ okActions?: IAlarmAction[];
28
+ insufficientDataActions?: IAlarmAction[];
29
+ }
30
+ /** A rule: a matcher (or matchers) plus an action set, with optional scoping flags. */
31
+ export interface AlarmActionRule extends AlarmActionSet {
32
+ /** Matcher(s). A rule matches when **any** supplied matcher matches. */
33
+ match: AlarmMatcher | AlarmMatcher[];
34
+ /** When this rule matches, suppress `defaults` for the alarm. */
35
+ replaceDefaults?: boolean;
36
+ /** Apply only to single (non-composite) alarms. */
37
+ singleOnly?: boolean;
38
+ /** Apply only to composite alarms. */
39
+ compositeOnly?: boolean;
40
+ }
41
+ /** Configuration for {@link alarmActionsPolicy}. */
42
+ export interface AlarmActionsPolicyConfig {
43
+ /** Actions applied to every matched alarm unless a matching rule sets `replaceDefaults: true`. */
44
+ defaults?: AlarmActionSet;
45
+ /** Ordered list of overrides. All matching rules contribute (append semantics). */
46
+ rules?: AlarmActionRule[];
47
+ /** Skip alarms that already have non-empty `alarmActions`. */
48
+ skipIfAlreadyConfigured?: boolean;
49
+ }
50
+ /**
51
+ * Attaches CloudWatch alarm actions to every `Alarm` and `CompositeAlarm`
52
+ * (L2) construct in the subtree under `scope`.
53
+ *
54
+ * The policy installs a CDK {@link https://docs.aws.amazon.com/cdk/v2/guide/aspects.html | Aspect}
55
+ * that fires during the synth prepare phase, so late-added alarms are also
56
+ * covered. Detection uses the jsii type guards
57
+ * `CfnAlarm.isCfnAlarm` / `CfnCompositeAlarm.isCfnCompositeAlarm` on the L1
58
+ * resource; the L2 parent is found via duck-typing on `addAlarmAction`.
59
+ * Actions are attached through the L2 so that `IAlarmAction.bind()` runs and
60
+ * permissions are wired correctly. Bare `CfnAlarm` nodes (created without an
61
+ * L2 wrapper) are detected but silently skipped.
62
+ *
63
+ * `defaults` apply to every matched alarm; `rules` append additional actions.
64
+ * A rule matches if any of its `match` entries matches. Set
65
+ * `replaceDefaults: true` on a rule to suppress defaults for its matched
66
+ * alarms.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * alarmActionsPolicy(app, {
71
+ * defaults: { alarmActions: [new SnsAction(standardTopic)] },
72
+ * rules: [
73
+ * { match: "HighSev", alarmActions: [new SnsAction(pagerTopic)] },
74
+ * ],
75
+ * });
76
+ * ```
77
+ */
78
+ export declare function alarmActionsPolicy(scope: IConstruct, config: AlarmActionsPolicyConfig): void;
79
+ //# sourceMappingURL=alarm-actions-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alarm-actions-policy.d.ts","sourceRoot":"","sources":["../../src/policies/alarm-actions-policy.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,KAAK,MAAM,EACX,KAAK,YAAY,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,iBAAiB,CAAC;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1C;AAED,uFAAuF;AACvF,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,wEAAwE;IACxE,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACrC,iEAAiE;IACjE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,kGAAkG;IAClG,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,mFAAmF;IACnF,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,8DAA8D;IAC9D,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAyED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAkD5F"}
@@ -0,0 +1,143 @@
1
+ import { Aspects, Stack } from "aws-cdk-lib";
2
+ import { CfnAlarm, CfnCompositeAlarm, } from "aws-cdk-lib/aws-cloudwatch";
3
+ function isL2AlarmLike(node) {
4
+ if (node === undefined)
5
+ return false;
6
+ const candidate = node;
7
+ return (typeof candidate.addAlarmAction === "function" &&
8
+ typeof candidate.addOkAction === "function" &&
9
+ typeof candidate.addInsufficientDataAction === "function");
10
+ }
11
+ function isAlreadyConfigured(cfn) {
12
+ // `cfn.alarmActions` is always a Lazy-wrapped array at aspect-visit time,
13
+ // even when empty. Resolve it against the owning Stack to inspect real contents.
14
+ const actions = cfn.alarmActions;
15
+ if (actions === undefined)
16
+ return false;
17
+ const resolved = Stack.of(cfn).resolve(actions);
18
+ if (resolved === undefined || resolved === null)
19
+ return false;
20
+ if (Array.isArray(resolved))
21
+ return resolved.length > 0;
22
+ return true;
23
+ }
24
+ function matchesOne(matcher, ctx) {
25
+ if (typeof matcher === "function")
26
+ return matcher(ctx);
27
+ if (matcher instanceof RegExp)
28
+ return matcher.test(ctx.path);
29
+ return ctx.id.includes(matcher) || ctx.path.includes(matcher);
30
+ }
31
+ function ruleMatches(rule, ctx) {
32
+ if (rule.singleOnly === true && ctx.isComposite)
33
+ return false;
34
+ if (rule.compositeOnly === true && !ctx.isComposite)
35
+ return false;
36
+ const matchers = Array.isArray(rule.match) ? rule.match : [rule.match];
37
+ return matchers.some((m) => matchesOne(m, ctx));
38
+ }
39
+ function dedupe(items) {
40
+ const seen = new Set();
41
+ const result = [];
42
+ for (const item of items) {
43
+ if (!seen.has(item)) {
44
+ seen.add(item);
45
+ result.push(item);
46
+ }
47
+ }
48
+ return result;
49
+ }
50
+ function visitAlarms(scope, visit) {
51
+ Aspects.of(scope).add({
52
+ visit(node) {
53
+ const isAlarm = CfnAlarm.isCfnAlarm(node);
54
+ const isComposite = CfnCompositeAlarm.isCfnCompositeAlarm(node);
55
+ if (!isAlarm && !isComposite)
56
+ return;
57
+ const parent = node.node.scope;
58
+ const l2 = isL2AlarmLike(parent) ? parent : undefined;
59
+ visit(node, l2, isComposite);
60
+ },
61
+ });
62
+ }
63
+ /**
64
+ * Attaches CloudWatch alarm actions to every `Alarm` and `CompositeAlarm`
65
+ * (L2) construct in the subtree under `scope`.
66
+ *
67
+ * The policy installs a CDK {@link https://docs.aws.amazon.com/cdk/v2/guide/aspects.html | Aspect}
68
+ * that fires during the synth prepare phase, so late-added alarms are also
69
+ * covered. Detection uses the jsii type guards
70
+ * `CfnAlarm.isCfnAlarm` / `CfnCompositeAlarm.isCfnCompositeAlarm` on the L1
71
+ * resource; the L2 parent is found via duck-typing on `addAlarmAction`.
72
+ * Actions are attached through the L2 so that `IAlarmAction.bind()` runs and
73
+ * permissions are wired correctly. Bare `CfnAlarm` nodes (created without an
74
+ * L2 wrapper) are detected but silently skipped.
75
+ *
76
+ * `defaults` apply to every matched alarm; `rules` append additional actions.
77
+ * A rule matches if any of its `match` entries matches. Set
78
+ * `replaceDefaults: true` on a rule to suppress defaults for its matched
79
+ * alarms.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * alarmActionsPolicy(app, {
84
+ * defaults: { alarmActions: [new SnsAction(standardTopic)] },
85
+ * rules: [
86
+ * { match: "HighSev", alarmActions: [new SnsAction(pagerTopic)] },
87
+ * ],
88
+ * });
89
+ * ```
90
+ */
91
+ export function alarmActionsPolicy(scope, config) {
92
+ const { defaults, rules = [], skipIfAlreadyConfigured = false } = config;
93
+ const processed = new WeakSet();
94
+ visitAlarms(scope, (cfn, alarm, isComposite) => {
95
+ if (alarm === undefined)
96
+ return;
97
+ if (processed.has(alarm))
98
+ return;
99
+ if (skipIfAlreadyConfigured && isAlreadyConfigured(cfn))
100
+ return;
101
+ const ctx = {
102
+ alarm: alarm,
103
+ cfn,
104
+ id: alarm.node.id,
105
+ path: alarm.node.path,
106
+ isComposite,
107
+ };
108
+ const matched = rules.filter((r) => ruleMatches(r, ctx));
109
+ const replaceDefaults = matched.some((r) => r.replaceDefaults === true);
110
+ const alarmActions = [];
111
+ const okActions = [];
112
+ const insufficientDataActions = [];
113
+ if (defaults !== undefined && !replaceDefaults) {
114
+ if (defaults.alarmActions !== undefined)
115
+ alarmActions.push(...defaults.alarmActions);
116
+ if (defaults.okActions !== undefined)
117
+ okActions.push(...defaults.okActions);
118
+ if (defaults.insufficientDataActions !== undefined) {
119
+ insufficientDataActions.push(...defaults.insufficientDataActions);
120
+ }
121
+ }
122
+ for (const rule of matched) {
123
+ if (rule.alarmActions !== undefined)
124
+ alarmActions.push(...rule.alarmActions);
125
+ if (rule.okActions !== undefined)
126
+ okActions.push(...rule.okActions);
127
+ if (rule.insufficientDataActions !== undefined) {
128
+ insufficientDataActions.push(...rule.insufficientDataActions);
129
+ }
130
+ }
131
+ const uniqueAlarm = dedupe(alarmActions);
132
+ const uniqueOk = dedupe(okActions);
133
+ const uniqueInsufficient = dedupe(insufficientDataActions);
134
+ if (uniqueAlarm.length > 0)
135
+ alarm.addAlarmAction(...uniqueAlarm);
136
+ if (uniqueOk.length > 0)
137
+ alarm.addOkAction(...uniqueOk);
138
+ if (uniqueInsufficient.length > 0)
139
+ alarm.addInsufficientDataAction(...uniqueInsufficient);
140
+ processed.add(alarm);
141
+ });
142
+ }
143
+ //# sourceMappingURL=alarm-actions-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alarm-actions-policy.js","sourceRoot":"","sources":["../../src/policies/alarm-actions-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,iBAAiB,GAGlB,MAAM,4BAA4B,CAAC;AA6DpC,SAAS,aAAa,CAAC,IAA4B;IACjD,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACrC,MAAM,SAAS,GAAG,IAA0C,CAAC;IAC7D,OAAO,CACL,OAAO,SAAS,CAAC,cAAc,KAAK,UAAU;QAC9C,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU;QAC3C,OAAO,SAAS,CAAC,yBAAyB,KAAK,UAAU,CAC1D,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAiC;IAC5D,0EAA0E;IAC1E,iFAAiF;IACjF,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,CAAC;IACjC,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACxC,MAAM,QAAQ,GA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Y,KAAK,SAAS;gBAAE,YAAY,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;YAC7E,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gBAAE,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;YACpE,IAAI,IAAI,CAAC,uBAAuB,KAAK,SAAS,EAAE,CAAC;gBAC/C,uBAAuB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,uBAAuB,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QACnC,MAAM,kBAAkB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAE3D,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,cAAc,CAAC,GAAG,WAAW,CAAC,CAAC;QACjE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC;QACxD,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,yBAAyB,CAAC,GAAG,kBAAkB,CAAC,CAAC;QAE1F,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composurecdk/cloudwatch",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Composable CloudWatch alarm primitives for composureCDK resource packages",
5
5
  "repository": {
6
6
  "type": "git",