@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AnomalySubscription extends Object implements Serializable, Cloneable, StructuredPojo
An AnomalySubscription
resource (also referred to as an alert subscription) sends notifications about
specific anomalies that meet an alerting criteria defined by you.
You can specify the frequency of the alerts and the subscribers to notify.
Anomaly subscriptions can be associated with one or more
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.
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
GetAnomalies
API.
Constructor and Description |
---|
AnomalySubscription() |
Modifier and Type | Method and Description |
---|---|
AnomalySubscription |
clone() |
boolean |
equals(Object obj) |
String |
getAccountId()
Your unique account identifier.
|
String |
getFrequency()
The frequency that anomaly notifications are sent.
|
List<String> |
getMonitorArnList()
A list of cost anomaly monitors.
|
List<Subscriber> |
getSubscribers()
A list of subscribers to notify.
|
String |
getSubscriptionArn()
The
AnomalySubscription Amazon Resource Name (ARN). |
String |
getSubscriptionName()
The name for the subscription.
|
Double |
getThreshold()
Deprecated.
|
Expression |
getThresholdExpression()
An Expression
object used to specify the anomalies that you want to generate alerts for.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAccountId(String accountId)
Your unique account identifier.
|
void |
setFrequency(String frequency)
The frequency that anomaly notifications are sent.
|
void |
setMonitorArnList(Collection<String> monitorArnList)
A list of cost anomaly monitors.
|
void |
setSubscribers(Collection<Subscriber> subscribers)
A list of subscribers to notify.
|
void |
setSubscriptionArn(String subscriptionArn)
The
AnomalySubscription Amazon Resource Name (ARN). |
void |
setSubscriptionName(String subscriptionName)
The name for the subscription.
|
void |
setThreshold(Double threshold)
Deprecated.
|
void |
setThresholdExpression(Expression thresholdExpression)
An Expression
object used to specify the anomalies that you want to generate alerts for.
|
String |
toString()
Returns a string representation of this object.
|
AnomalySubscription |
withAccountId(String accountId)
Your unique account identifier.
|
AnomalySubscription |
withFrequency(AnomalySubscriptionFrequency frequency)
The frequency that anomaly notifications are sent.
|
AnomalySubscription |
withFrequency(String frequency)
The frequency that anomaly notifications are sent.
|
AnomalySubscription |
withMonitorArnList(Collection<String> monitorArnList)
A list of cost anomaly monitors.
|
AnomalySubscription |
withMonitorArnList(String... monitorArnList)
A list of cost anomaly monitors.
|
AnomalySubscription |
withSubscribers(Collection<Subscriber> subscribers)
A list of subscribers to notify.
|
AnomalySubscription |
withSubscribers(Subscriber... subscribers)
A list of subscribers to notify.
|
AnomalySubscription |
withSubscriptionArn(String subscriptionArn)
The
AnomalySubscription Amazon Resource Name (ARN). |
AnomalySubscription |
withSubscriptionName(String subscriptionName)
The name for the subscription.
|
AnomalySubscription |
withThreshold(Double threshold)
Deprecated.
|
AnomalySubscription |
withThresholdExpression(Expression thresholdExpression)
An Expression
object used to specify the anomalies that you want to generate alerts for.
|
public void setSubscriptionArn(String subscriptionArn)
The AnomalySubscription
Amazon Resource Name (ARN).
subscriptionArn
- The AnomalySubscription
Amazon Resource Name (ARN).public String getSubscriptionArn()
The AnomalySubscription
Amazon Resource Name (ARN).
AnomalySubscription
Amazon Resource Name (ARN).public AnomalySubscription withSubscriptionArn(String subscriptionArn)
The AnomalySubscription
Amazon Resource Name (ARN).
subscriptionArn
- The AnomalySubscription
Amazon Resource Name (ARN).public void setAccountId(String accountId)
Your unique account identifier.
accountId
- Your unique account identifier.public String getAccountId()
Your unique account identifier.
public AnomalySubscription withAccountId(String accountId)
Your unique account identifier.
accountId
- Your unique account identifier.public List<String> getMonitorArnList()
A list of cost anomaly monitors.
public void setMonitorArnList(Collection<String> monitorArnList)
A list of cost anomaly monitors.
monitorArnList
- A list of cost anomaly monitors.public AnomalySubscription withMonitorArnList(String... monitorArnList)
A list of cost anomaly monitors.
NOTE: This method appends the values to the existing list (if any). Use
setMonitorArnList(java.util.Collection)
or withMonitorArnList(java.util.Collection)
if you want
to override the existing values.
monitorArnList
- A list of cost anomaly monitors.public AnomalySubscription withMonitorArnList(Collection<String> monitorArnList)
A list of cost anomaly monitors.
monitorArnList
- A list of cost anomaly monitors.public List<Subscriber> getSubscribers()
A list of subscribers to notify.
public void setSubscribers(Collection<Subscriber> subscribers)
A list of subscribers to notify.
subscribers
- A list of subscribers to notify.public AnomalySubscription withSubscribers(Subscriber... subscribers)
A list of subscribers to notify.
NOTE: This method appends the values to the existing list (if any). Use
setSubscribers(java.util.Collection)
or withSubscribers(java.util.Collection)
if you want to
override the existing values.
subscribers
- A list of subscribers to notify.public AnomalySubscription withSubscribers(Collection<Subscriber> subscribers)
A list of subscribers to notify.
subscribers
- A list of subscribers to notify.@Deprecated public void setThreshold(Double 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.
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.
@Deprecated public Double getThreshold()
(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.
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.
@Deprecated public AnomalySubscription withThreshold(Double 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.
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.
public void setFrequency(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.
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.AnomalySubscriptionFrequency
public String getFrequency()
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.
AnomalySubscriptionFrequency
public AnomalySubscription withFrequency(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.
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.AnomalySubscriptionFrequency
public AnomalySubscription withFrequency(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.
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.AnomalySubscriptionFrequency
public void setSubscriptionName(String subscriptionName)
The name for the subscription.
subscriptionName
- The name for the subscription.public String getSubscriptionName()
The name for the subscription.
public AnomalySubscription withSubscriptionName(String subscriptionName)
The name for the subscription.
subscriptionName
- The name for the subscription.public void setThresholdExpression(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" ] } } ] }
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" ] } } ] }
public Expression getThresholdExpression()
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" ] } } ] }
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" ] } } ] }
public AnomalySubscription withThresholdExpression(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" ] } } ] }
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" ] } } ] }
public String toString()
toString
in class Object
Object.toString()
public AnomalySubscription clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.