-
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 cross-environment search expressions #16539
Conversation
…ironment math expressions (aws#9039) Fixes: aws#9039 Currently CDK gives no way to specify account or region on MathExpressions which means it is not possible to run SEARCH or SERVICE_QUOTA expressions against environments other than the deployment environment. The CloudWatch console currently has this capability, however the documentation still states that accountId or region should only be used on metric widgets: https://docs.aws.amazon.com/en_us/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Metric-Widget-Object . I've left feedback to ask whether this documentation is out of date. This change adds in these properties which can be optionally specified for Dashboards. For the Alarm use case, this change will throw an error if an account or region is provided and it does not match the deployment account/region.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…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*
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 still states that
accountId
orregion
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
andsearchRegion
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