Class CfnAnomalySubscriptionProps.Builder
java.lang.Object
software.amazon.awscdk.services.ce.CfnAnomalySubscriptionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAnomalySubscriptionProps>
- Enclosing interface:
CfnAnomalySubscriptionProps
@Stability(Stable)
public static final class CfnAnomalySubscriptionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAnomalySubscriptionProps>
A builder for
CfnAnomalySubscriptionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnAnomalySubscriptionProps.getFrequency()
monitorArnList
(List<String> monitorArnList) Sets the value ofCfnAnomalySubscriptionProps.getMonitorArnList()
resourceTags
(List<? extends Object> resourceTags) Sets the value ofCfnAnomalySubscriptionProps.getResourceTags()
resourceTags
(IResolvable resourceTags) Sets the value ofCfnAnomalySubscriptionProps.getResourceTags()
subscribers
(List<? extends Object> subscribers) Sets the value ofCfnAnomalySubscriptionProps.getSubscribers()
subscribers
(IResolvable subscribers) Sets the value ofCfnAnomalySubscriptionProps.getSubscribers()
subscriptionName
(String subscriptionName) Sets the value ofCfnAnomalySubscriptionProps.getSubscriptionName()
Sets the value ofCfnAnomalySubscriptionProps.getThreshold()
thresholdExpression
(String thresholdExpression) Sets the value ofCfnAnomalySubscriptionProps.getThresholdExpression()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
frequency
Sets the value ofCfnAnomalySubscriptionProps.getFrequency()
- Parameters:
frequency
- The frequency that anomaly notifications are sent. This parameter is required. Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic for anomaly notifications .- Returns:
this
-
monitorArnList
@Stability(Stable) public CfnAnomalySubscriptionProps.Builder monitorArnList(List<String> monitorArnList) Sets the value ofCfnAnomalySubscriptionProps.getMonitorArnList()
- Parameters:
monitorArnList
- A list of cost anomaly monitors. This parameter is required.- Returns:
this
-
subscribers
Sets the value ofCfnAnomalySubscriptionProps.getSubscribers()
- Parameters:
subscribers
- A list of subscribers to notify. This parameter is required.- Returns:
this
-
subscribers
@Stability(Stable) public CfnAnomalySubscriptionProps.Builder subscribers(List<? extends Object> subscribers) Sets the value ofCfnAnomalySubscriptionProps.getSubscribers()
- Parameters:
subscribers
- A list of subscribers to notify. This parameter is required.- Returns:
this
-
subscriptionName
@Stability(Stable) public CfnAnomalySubscriptionProps.Builder subscriptionName(String subscriptionName) Sets the value ofCfnAnomalySubscriptionProps.getSubscriptionName()
- Parameters:
subscriptionName
- The name for the subscription. This parameter is required.- Returns:
this
-
resourceTags
@Stability(Stable) public CfnAnomalySubscriptionProps.Builder resourceTags(IResolvable resourceTags) Sets the value ofCfnAnomalySubscriptionProps.getResourceTags()
- Parameters:
resourceTags
- Tags to assign to subscription.- Returns:
this
-
resourceTags
@Stability(Stable) public CfnAnomalySubscriptionProps.Builder resourceTags(List<? extends Object> resourceTags) Sets the value ofCfnAnomalySubscriptionProps.getResourceTags()
- Parameters:
resourceTags
- Tags to assign to subscription.- Returns:
this
-
threshold
Sets the value ofCfnAnomalySubscriptionProps.getThreshold()
- Parameters:
threshold
- (deprecated). An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact for more details) for an anomaly notification to be generated.This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
One of Threshold or ThresholdExpression is required for
AWS::CE::AnomalySubscription
. You cannot specify both.- Returns:
this
-
thresholdExpression
@Stability(Stable) public CfnAnomalySubscriptionProps.Builder thresholdExpression(String thresholdExpression) Sets the value ofCfnAnomalySubscriptionProps.getThresholdExpression()
- Parameters:
thresholdExpression
- An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions areANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areAND
andOR
. The match optionGREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format. One of Threshold or ThresholdExpression is required forAWS::CE::AnomalySubscription
. You cannot specify both.For further information, see the Examples section of this page.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAnomalySubscriptionProps>
- Returns:
- a new instance of
CfnAnomalySubscriptionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-