-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(cloudwatch): Support region and account in math expressions #9034
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@ericzbeard @SomayaB can we please agree for once who is the assignee(s)? :) |
I'd prefer this to be as implicit as possible. First of all, can you describe what the rules are we have to keep to? Do all metrics have to come from the same region and account? If the math expression uses other metrics, I'd prefer if we automatically derived the account/region on the math expression. And validated it too, if that is required (if there are real metrics from different regions/accounts under a math expression, reject that early on if that is not allowed). Does it come down to math expressions only requiring account/region if they do not use any other metrics to build the expression off of? |
Im going to close this, please reopen when ready |
Fixes #9039 (also some prior discussion on #9034) Currently CDK gives no way to specify account or region on MathExpressions which means it is not possible to run search expressions against environments other than the deployment environment. The CloudWatch console currently has this capability, however [the documentation](https://docs.aws.amazon.com/en_us/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Metric-Widget-Object) still states that `accountId` or `region` should only be used on metric widgets. I've left feedback to ask whether this documentation is out of date or whether it is an undocumented feature. This change adds in the `searchAccount` and `searchRegion` property which can be optionally specified for the Dashboards use case. When a MathExpression with a searchAccount or searchRegion set is attempted to be used within an Alarm, the change throws an error as Alarms do not support search expressions. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…6539) Fixes aws#9039 (also some prior discussion on aws#9034) Currently CDK gives no way to specify account or region on MathExpressions which means it is not possible to run search expressions against environments other than the deployment environment. The CloudWatch console currently has this capability, however [the documentation](https://docs.aws.amazon.com/en_us/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Metric-Widget-Object) still states that `accountId` or `region` should only be used on metric widgets. I've left feedback to ask whether this documentation is out of date or whether it is an undocumented feature. This change adds in the `searchAccount` and `searchRegion` property which can be optionally specified for the Dashboards use case. When a MathExpression with a searchAccount or searchRegion set is attempted to be used within an Alarm, the change throws an error as Alarms do not support search expressions. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adds support for MathExpressions to specify the region the metric is from
Closes #9039
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license