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
Add support for percentage-based thresholds #23
Add support for percentage-based thresholds #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -68,6 +68,40 @@ public void handleRequest_Success() { | |||
assertThat(response.getErrorCode()).isNull(); | |||
} | |||
|
|||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a similar test under UpdateHandler? Could that be a good place to document the nuances of Update for Threshold/ThresholdExpression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, can add a similar unit test
Update: Added 👍
@@ -35,6 +37,7 @@ public static UpdateAnomalySubscriptionRequest buildUpdateAnomalySubscriptionReq | |||
.subscriptionArn(model.getSubscriptionArn()) | |||
.subscriptionName(model.getSubscriptionName()) | |||
.threshold(model.getThreshold()) | |||
.thresholdExpression(model.getThresholdExpression() != null ? Utils.toExpressionFromJson(model.getThresholdExpression()) : null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a comment to this method about acceptable inputs for Threshold and ThresholdExpression for updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, will add
Update: Added 👍
Did this ever get rolled out to ap-northeast-1? I get the following error when trying to create a changeset:
|
Hello,
We have plans to expand to all regions, but unfortunately for now that is the restriction |
I know CFN docs don't mention regions, but It would've saved me a lot of time if the docs had mentioned that. Thanks for the response here though, I do appreciate it. |
Hello! Been a while, but we just released to every region: https://aws.amazon.com/about-aws/whats-new/2023/12/cost-anomaly-detection-cloudformation-region-support/ Including, of course, Hopefully this helps! |
Description of changes
Adding support for
ThresholdExpression
on the AWS::CE::AnomalySubscription resource.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.