Interface AnomalySubscription.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<AnomalySubscription.Builder,AnomalySubscription>,SdkBuilder<AnomalySubscription.Builder,AnomalySubscription>,SdkPojo
- Enclosing class:
- AnomalySubscription
public static interface AnomalySubscription.Builder extends SdkPojo, CopyableBuilder<AnomalySubscription.Builder,AnomalySubscription>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description AnomalySubscription.BuilderaccountId(String accountId)Your unique account identifier.AnomalySubscription.Builderfrequency(String frequency)The frequency that anomaly notifications are sent.AnomalySubscription.Builderfrequency(AnomalySubscriptionFrequency frequency)The frequency that anomaly notifications are sent.AnomalySubscription.BuildermonitorArnList(String... monitorArnList)A list of cost anomaly monitors.AnomalySubscription.BuildermonitorArnList(Collection<String> monitorArnList)A list of cost anomaly monitors.AnomalySubscription.Buildersubscribers(Collection<Subscriber> subscribers)A list of subscribers to notify.AnomalySubscription.Buildersubscribers(Consumer<Subscriber.Builder>... subscribers)A list of subscribers to notify.AnomalySubscription.Buildersubscribers(Subscriber... subscribers)A list of subscribers to notify.AnomalySubscription.BuildersubscriptionArn(String subscriptionArn)TheAnomalySubscriptionAmazon Resource Name (ARN).AnomalySubscription.BuildersubscriptionName(String subscriptionName)The name for the subscription.AnomalySubscription.Builderthreshold(Double threshold)Deprecated.Threshold has been deprecated in favor of ThresholdExpressiondefault AnomalySubscription.BuilderthresholdExpression(Consumer<Expression.Builder> thresholdExpression)An Expression object used to specify the anomalies that you want to generate alerts for.AnomalySubscription.BuilderthresholdExpression(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 Detail
-
subscriptionArn
AnomalySubscription.Builder subscriptionArn(String subscriptionArn)
The
AnomalySubscriptionAmazon Resource Name (ARN).- Parameters:
subscriptionArn- TheAnomalySubscriptionAmazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accountId
AnomalySubscription.Builder accountId(String 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
AnomalySubscription.Builder monitorArnList(Collection<String> 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
AnomalySubscription.Builder monitorArnList(String... 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
AnomalySubscription.Builder subscribers(Collection<Subscriber> 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
AnomalySubscription.Builder subscribers(Subscriber... 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
AnomalySubscription.Builder subscribers(Consumer<Subscriber.Builder>... subscribers)
A list of subscribers to notify.
This is a convenience method that creates an instance of theSubscriber.Builderavoiding the need to create one manually viaSubscriber.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#subscribers(List.) - 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:
#subscribers(java.util.Collection)
-
threshold
@Deprecated AnomalySubscription.Builder threshold(Double 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
AnomalySubscription.Builder frequency(String 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:
AnomalySubscriptionFrequency,AnomalySubscriptionFrequency
-
frequency
AnomalySubscription.Builder frequency(AnomalySubscriptionFrequency 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:
AnomalySubscriptionFrequency,AnomalySubscriptionFrequency
-
subscriptionName
AnomalySubscription.Builder subscriptionName(String 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
AnomalySubscription.Builder thresholdExpression(Expression 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_ABSOLUTEandANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areANDandOR. The match optionGREATER_THAN_OR_EQUALis 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" ] } } -
ANDtwo 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" ] } } ] } -
ORtwo 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_ABSOLUTEandANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areANDandOR. The match optionGREATER_THAN_OR_EQUALis 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" ] } } -
ANDtwo 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" ] } } ] } -
ORtwo 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_ABSOLUTEandANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areANDandOR. The match optionGREATER_THAN_OR_EQUALis 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" ] } } -
ANDtwo 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" ] } } ] } -
ORtwo 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.Builderavoiding the need to create one manually viaExpression.builder().When the
Consumercompletes,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:
thresholdExpression(Expression)
-
-
-