Interface AnomalySubscription.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<AnomalySubscription.Builder,
,AnomalySubscription> SdkBuilder<AnomalySubscription.Builder,
,AnomalySubscription> SdkPojo
- Enclosing class:
AnomalySubscription
-
Method Summary
Modifier and TypeMethodDescriptionYour unique account identifier.The frequency that anomaly notifications are sent.frequency
(AnomalySubscriptionFrequency frequency) The frequency that anomaly notifications are sent.monitorArnList
(String... monitorArnList) A list of cost anomaly monitors.monitorArnList
(Collection<String> monitorArnList) A list of cost anomaly monitors.subscribers
(Collection<Subscriber> subscribers) A list of subscribers to notify.subscribers
(Consumer<Subscriber.Builder>... subscribers) A list of subscribers to notify.subscribers
(Subscriber... subscribers) A list of subscribers to notify.subscriptionArn
(String subscriptionArn) TheAnomalySubscription
Amazon Resource Name (ARN).subscriptionName
(String subscriptionName) The name for the subscription.Deprecated.Threshold has been deprecated in favor of ThresholdExpressiondefault AnomalySubscription.Builder
thresholdExpression
(Consumer<Expression.Builder> thresholdExpression) An Expression object used to specify the anomalies that you want to generate alerts for.thresholdExpression
(Expression thresholdExpression) An Expression object used to specify the anomalies that you want to generate alerts for.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
subscriptionArn
The
AnomalySubscription
Amazon Resource Name (ARN).- Parameters:
subscriptionArn
- TheAnomalySubscription
Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accountId
Your unique account identifier.
- Parameters:
accountId
- Your unique account identifier.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
monitorArnList
A list of cost anomaly monitors.
- Parameters:
monitorArnList
- A list of cost anomaly monitors.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
monitorArnList
A list of cost anomaly monitors.
- Parameters:
monitorArnList
- A list of cost anomaly monitors.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
subscribers
A list of subscribers to notify.
- Parameters:
subscribers
- A list of subscribers to notify.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
subscribers
A list of subscribers to notify.
- Parameters:
subscribers
- A list of subscribers to notify.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
subscribers
A list of subscribers to notify.
This is a convenience method that creates an instance of theSubscriber.Builder
avoiding the need to create one manually viaSubscriber.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosubscribers(List<Subscriber>)
.- Parameters:
subscribers
- a consumer that will call methods onSubscriber.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
threshold
Deprecated.Threshold has been deprecated in favor of ThresholdExpression(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 this resource. You cannot specify both.
- 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 this resource. You cannot specify both.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
frequency
The frequency that anomaly notifications are sent. 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.
- Parameters:
frequency
- The frequency that anomaly notifications are sent. 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:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
frequency
The frequency that anomaly notifications are sent. 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.
- Parameters:
frequency
- The frequency that anomaly notifications are sent. 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:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
subscriptionName
The name for the subscription.
- Parameters:
subscriptionName
- The name for the subscription.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
thresholdExpression
An Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are
ANOMALY_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 for this resource. You cannot specify both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
AND
two thresholds together:{ "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
OR
two thresholds together:{ "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
- Parameters:
thresholdExpression
- An Expression object 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 for this resource. You cannot specify both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
AND
two thresholds together:{ "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
OR
two thresholds together:{ "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
thresholdExpression
default AnomalySubscription.Builder thresholdExpression(Consumer<Expression.Builder> thresholdExpression) An Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are
ANOMALY_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 for this resource. You cannot specify both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
AND
two thresholds together:{ "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
OR
two thresholds together:{ "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
Expression.Builder
avoiding the need to create one manually viaExpression.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tothresholdExpression(Expression)
.- Parameters:
thresholdExpression
- a consumer that will call methods onExpression.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-