-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_cloudwatch: Alarm dimensions support #29068
Comments
We probably can add that in AlarmProps or CreateAlarmOptions. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I think it should be CreateAlarmOptions in order for it to work with new MetricFilter(self, 'MetricFilter', {}).metric({}).createAlarm(self, 'MetricFilterMetricAlarm', {
dimensions: { key: 'value' }
}) |
Describe the feature
It is currently not possible to add dimensions to the Alarm construct while it is possible to do so using CfnAlarm. Support for dimensions on the Alarm construct itself would be nice so we don't have to do some lower level magic with the Cfn construct.
Use Case
I have logic that depends on a specific dimension to exist on an alarm.
With alarms based on for example MetricFilters metrics, the metric's dimensions do not propagate to the alarm so I need to set them manually on the alarm. While it is possible with CfnAlarm, this makes it inconvenient because all other alarms are of the Alarm construct and have convenience methods like
addAlarmAction
, where both the fields are slightly different on CfnAlarm and it does not have these methods.Proposed Solution
Other Information
No response
Acknowledgements
CDK version used
latest
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: