Spec Bug "AWS::CloudWatch::Alarm" "MetricName" (required) ?
See original GitHub issueAccording to the Documentation and the Spec files the AWS::CloudWatch::Alarm
MetricName
is not required:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-metricname
But deploying an Allarm without MetricName results in an error:
Used resource:
CloudWatchAlarm:
Type: "AWS::CloudWatch::Alarm"
Properties:
ComparisonOperator: "GreaterThanOrEqualToThreshold"
EvaluationPeriods: 1
Statistic: "SampleCount"
Threshold: 0.0
TreatMissingData: "notBreaching"
Unit: "Terabits/Second"
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Spec Bug "AWS::CloudWatch::Alarm" "MetricName" (required ...
According to the Documentation and the Spec files the AWS::CloudWatch::Alarm MetricName is not required:
Read more >MetricAlarm - Amazon CloudWatch - AWS Documentation
Indicates whether actions should be executed during any changes to the alarm state. Type: Boolean. Required: No. AlarmActions.member.N. The actions to execute ...
Read more >Explain AWS Cloud Watch Alarm | InterviewDOT - YouTube
AWS CLOUDWATCH ALARM | Explain AWS Cloud Watch Alarm | InterviewDOT ... you need a unified operational overview, real-time granular data, ...
Read more >Explain AWS Cloud Watch Alarm | InterviewDOT - YouTube
AWS CLOUDWATCH ALARM | Explain AWS Cloud Watch Alarm | InterviewDOT. Watch later ... An error occurred while retrieving sharing information.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, clarification on an internal list.
You can define a
Metrics
complex parameter -or- any of:So, each of those properties has an OnlyOne relationship with Metrics. Additionally,
ExtendedStatistic
andStatistic
are OnlyOne with one or the other required… unless you’ve suppliedMetrics
in which case you can’t use either. Oh, this is a fun one!I think we can close this one. I just submitted pull request https://github.com/aws-cloudformation/cfn-python-lint/pull/771 to clean some of this up. From my testing Metrics or MetricName had to be specified. The list that @chuckmeyer has for attributes that can’t be defined when Metrics are defined also looks accurate.