Skip to content

Commit b1f96d5

Browse files
chore: update analytics metadata blueprints
1 parent 72a7893 commit b1f96d5

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

packages/aws-cdk-lib/aws-cloudwatch/lib/alarm.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,14 +623,20 @@ function isAnomalyDetectionMetric(metric: IMetric): boolean {
623623
* This alarm type is specifically designed for use with anomaly detection operators
624624
* like LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD.
625625
*/
626+
@propertyInjectable
626627
export class AnomalyDetectionAlarm extends Alarm {
628+
/** Uniquely identifies this class. */
629+
public static readonly PROPERTY_INJECTION_ID: string = 'aws-cdk-lib.aws-cloudwatch.AnomalyDetectionAlarm';
630+
627631
constructor(scope: Construct, id: string, props: AnomalyDetectionAlarmProps) {
628632
super(scope, id, {
629633
...props,
630634
comparisonOperator: props.comparisonOperator ?? ComparisonOperator.LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD,
631635
metric: Metric.anomalyDetectionFor(props),
632636
threshold: Alarm.ANOMALY_DETECTION_NO_THRESHOLD,
633637
});
638+
// Enhanced CDK Analytics Telemetry
639+
addConstructMetadata(this, props);
634640

635641
if (props.comparisonOperator && !isAnomalyDetectionOperator(props.comparisonOperator)) {
636642
throw new ValidationError(`Must use one of the anomaly detection operators, got ${props.comparisonOperator}`, this);

packages/aws-cdk-lib/core/lib/analytics-data-source/classes.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11045,12 +11045,12 @@ export const AWS_CDK_CONSTRUCTOR_PROPS: { [key: string]: any } = {
1104511045
'warnings': '*',
1104611046
'warningsV2': '*'
1104711047
},
11048+
'comparisonOperator': 'ComparisonOperator',
11049+
'threshold': '*',
1104811050
'period': '*',
1104911051
'statistic': '*',
1105011052
'alarmName': '*',
1105111053
'alarmDescription': '*',
11052-
'comparisonOperator': 'ComparisonOperator',
11053-
'threshold': '*',
1105411054
'evaluationPeriods': '*',
1105511055
'evaluateLowSampleCountPercentile': '*',
1105611056
'treatMissingData': 'TreatMissingData',
@@ -11061,6 +11061,23 @@ export const AWS_CDK_CONSTRUCTOR_PROPS: { [key: string]: any } = {
1106111061
'*'
1106211062
]
1106311063
},
11064+
'AnomalyDetectionAlarm': {
11065+
'metric': {
11066+
'warnings': '*',
11067+
'warningsV2': '*'
11068+
},
11069+
'stdDevs': '*',
11070+
'comparisonOperator': 'ComparisonOperator',
11071+
'period': '*',
11072+
'statistic': '*',
11073+
'alarmName': '*',
11074+
'alarmDescription': '*',
11075+
'evaluationPeriods': '*',
11076+
'evaluateLowSampleCountPercentile': '*',
11077+
'treatMissingData': 'TreatMissingData',
11078+
'actionsEnabled': 'boolean',
11079+
'datapointsToAlarm': '*'
11080+
},
1106411081
'CompositeAlarm': {
1106511082
'actionsEnabled': 'boolean',
1106611083
'alarmDescription': '*',

packages/aws-cdk-lib/core/lib/analytics-data-source/enums.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,8 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
870870
'nodejs14.x',
871871
'nodejs16.x',
872872
'nodejs18.x',
873-
'nodejs20.x'
873+
'nodejs20.x',
874+
'nodejs22.x'
874875
],
875876
'CustomThreatProtectionMode': [
876877
'ENFORCED',

packages/aws-cdk-lib/core/lib/analytics-data-source/enums/module-enums.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,7 +5303,8 @@
53035303
"nodejs14.x",
53045304
"nodejs16.x",
53055305
"nodejs18.x",
5306-
"nodejs20.x"
5306+
"nodejs20.x",
5307+
"nodejs22.x"
53075308
]
53085309
},
53095310
"aws-cdk/packages/aws-cdk-lib/core/lib/deps.ts": {
@@ -5440,7 +5441,8 @@
54405441
],
54415442
"Runtime": [
54425443
"nodejs18.x",
5443-
"nodejs20.x"
5444+
"nodejs20.x",
5445+
"nodejs22.x"
54445446
]
54455447
},
54465448
"aws-cdk/packages/aws-cdk-lib/triggers/lib/trigger.ts": {

0 commit comments

Comments
 (0)