Skip to content

Commit

Permalink
fix(aws-cloudwatch): metric id should be started with a lowercase letter
Browse files Browse the repository at this point in the history
fixes #13434
  • Loading branch information
BLasan committed Mar 12, 2021
1 parent d3f4284 commit f4d087b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ export class Alarm extends AlarmBase {
return dispatchMetric(metric, {
withStat(stat, conf) {
self.validateMetricStat(stat, metric);

if (conf.renderingProperties?.label == undefined) {
return dropUndefined({
dimensions: stat.dimensions,
Expand All @@ -283,7 +282,7 @@ export class Alarm extends AlarmBase {
stat: stat.statistic,
unit: stat.unitFilter,
},
id: stat.metricName,
id: 'm1',
label: conf.renderingProperties?.label,
returnData: true,
} as CfnAlarm.MetricDataQueryProperty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Properties": {
"Metrics": [
{
"Id": "Metric",
"Id": "m1",
"Label": "Metric [AVG: ${AVG}]",
"MetricStat": {
"Metric": {
Expand All @@ -28,7 +28,7 @@
"Properties": {
"Metrics": [
{
"Id": "Metric",
"Id": "m1",
"Label": "Metric [AVG: ${AVG}]",
"MetricStat": {
"Metric": {
Expand Down

0 comments on commit f4d087b

Please sign in to comment.