/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include An You can specify the frequency of the alerts and
* the subscribers to notify. Anomaly subscriptions can be associated with
* one or more
* Anomalies that don’t exceed the chosen threshold and
* therefore don’t trigger notifications from an anomaly subscription will still be
* available on the console and from the
* AnomalySubscription
resource (also referred to as an alert
* subscription) sends notifications about specific anomalies that meet an alerting
* criteria defined by you.AnomalyMonitor
resources, and they only send notifications
* about anomalies detected by those associated monitors. You can also configure a
* threshold to further control which anomalies are included in the
* notifications.GetAnomalies
API.See Also:
AWS
* API Reference
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
The AnomalySubscription
Amazon Resource Name (ARN).
Your unique account identifier.
*/ inline const Aws::String& GetAccountId() const{ return m_accountId; } /** *Your unique account identifier.
*/ inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } /** *Your unique account identifier.
*/ inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } /** *Your unique account identifier.
*/ inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } /** *Your unique account identifier.
*/ inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } /** *Your unique account identifier.
*/ inline AnomalySubscription& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} /** *Your unique account identifier.
*/ inline AnomalySubscription& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} /** *Your unique account identifier.
*/ inline AnomalySubscription& WithAccountId(const char* value) { SetAccountId(value); return *this;} /** *A list of cost anomaly monitors.
*/ inline const Aws::VectorA list of cost anomaly monitors.
*/ inline bool MonitorArnListHasBeenSet() const { return m_monitorArnListHasBeenSet; } /** *A list of cost anomaly monitors.
*/ inline void SetMonitorArnList(const Aws::VectorA list of cost anomaly monitors.
*/ inline void SetMonitorArnList(Aws::VectorA list of cost anomaly monitors.
*/ inline AnomalySubscription& WithMonitorArnList(const Aws::VectorA list of cost anomaly monitors.
*/ inline AnomalySubscription& WithMonitorArnList(Aws::VectorA list of cost anomaly monitors.
*/ inline AnomalySubscription& AddMonitorArnList(const Aws::String& value) { m_monitorArnListHasBeenSet = true; m_monitorArnList.push_back(value); return *this; } /** *A list of cost anomaly monitors.
*/ inline AnomalySubscription& AddMonitorArnList(Aws::String&& value) { m_monitorArnListHasBeenSet = true; m_monitorArnList.push_back(std::move(value)); return *this; } /** *A list of cost anomaly monitors.
*/ inline AnomalySubscription& AddMonitorArnList(const char* value) { m_monitorArnListHasBeenSet = true; m_monitorArnList.push_back(value); return *this; } /** *A list of subscribers to notify.
*/ inline const Aws::VectorA list of subscribers to notify.
*/ inline bool SubscribersHasBeenSet() const { return m_subscribersHasBeenSet; } /** *A list of subscribers to notify.
*/ inline void SetSubscribers(const Aws::VectorA list of subscribers to notify.
*/ inline void SetSubscribers(Aws::VectorA list of subscribers to notify.
*/ inline AnomalySubscription& WithSubscribers(const Aws::VectorA list of subscribers to notify.
*/ inline AnomalySubscription& WithSubscribers(Aws::VectorA list of subscribers to notify.
*/ inline AnomalySubscription& AddSubscribers(const Subscriber& value) { m_subscribersHasBeenSet = true; m_subscribers.push_back(value); return *this; } /** *A list of subscribers to notify.
*/ inline AnomalySubscription& AddSubscribers(Subscriber&& value) { m_subscribersHasBeenSet = true; m_subscribers.push_back(std::move(value)); return *this; } /** *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.
*/ inline const AnomalySubscriptionFrequency& GetFrequency() const{ return m_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.
*/ inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; } /** *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.
*/ inline void SetFrequency(const AnomalySubscriptionFrequency& value) { m_frequencyHasBeenSet = true; m_frequency = value; } /** *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.
*/ inline void SetFrequency(AnomalySubscriptionFrequency&& value) { m_frequencyHasBeenSet = true; m_frequency = std::move(value); } /** *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.
*/ inline AnomalySubscription& WithFrequency(const AnomalySubscriptionFrequency& value) { SetFrequency(value); return *this;} /** *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.
*/ inline AnomalySubscription& WithFrequency(AnomalySubscriptionFrequency&& value) { SetFrequency(std::move(value)); return *this;} /** *The name for the subscription.
*/ inline const Aws::String& GetSubscriptionName() const{ return m_subscriptionName; } /** *The name for the subscription.
*/ inline bool SubscriptionNameHasBeenSet() const { return m_subscriptionNameHasBeenSet; } /** *The name for the subscription.
*/ inline void SetSubscriptionName(const Aws::String& value) { m_subscriptionNameHasBeenSet = true; m_subscriptionName = value; } /** *The name for the subscription.
*/ inline void SetSubscriptionName(Aws::String&& value) { m_subscriptionNameHasBeenSet = true; m_subscriptionName = std::move(value); } /** *The name for the subscription.
*/ inline void SetSubscriptionName(const char* value) { m_subscriptionNameHasBeenSet = true; m_subscriptionName.assign(value); } /** *The name for the subscription.
*/ inline AnomalySubscription& WithSubscriptionName(const Aws::String& value) { SetSubscriptionName(value); return *this;} /** *The name for the subscription.
*/ inline AnomalySubscription& WithSubscriptionName(Aws::String&& value) { SetSubscriptionName(std::move(value)); return *this;} /** *The name for the subscription.
*/ inline AnomalySubscription& WithSubscriptionName(const char* value) { SetSubscriptionName(value); return *this;} /** *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" ] } } ] }
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" ] } } ] }
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" ] } } ] }
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" ] } } ] }
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" ] } } ] }
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" ] } } ] }