Interface AnomalySubscription.Builder

    • Method Detail

      • subscriptionArn

        AnomalySubscription.Builder subscriptionArn​(String subscriptionArn)

        The AnomalySubscription Amazon Resource Name (ARN).

        Parameters:
        subscriptionArn - The AnomalySubscription Amazon 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.
      • 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.
      • 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_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types are AND and OR. The match option GREATER_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 are ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types are AND and OR. The match option GREATER_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 and ANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types are AND and OR. The match option GREATER_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" ] } } ] }

        This is a convenience method that creates an instance of the Expression.Builder avoiding the need to create one manually via Expression.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to thresholdExpression(Expression).

        Parameters:
        thresholdExpression - a consumer that will call methods on Expression.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        thresholdExpression(Expression)