@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Anomaly extends Object implements Serializable, Cloneable, StructuredPojo
This structure represents one anomaly that has been found by a logs anomaly detector.
For more information about patterns and anomalies, see CreateLogAnomalyDetector.
Constructor and Description |
---|
Anomaly() |
Modifier and Type | Method and Description |
---|---|
Anomaly |
addHistogramEntry(String key,
Long value)
Add a single Histogram entry
|
Anomaly |
clearHistogramEntries()
Removes all the entries added into Histogram.
|
Anomaly |
clone() |
boolean |
equals(Object obj) |
Boolean |
getActive()
Specifies whether this anomaly is still ongoing.
|
String |
getAnomalyDetectorArn()
The ARN of the anomaly detector that identified this anomaly.
|
String |
getAnomalyId()
The unique ID that CloudWatch Logs assigned to this anomaly.
|
String |
getDescription()
A human-readable description of the anomaly.
|
Long |
getFirstSeen()
The date and time when the anomaly detector first saw this anomaly.
|
Map<String,Long> |
getHistogram()
A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs.
|
Boolean |
getIsPatternLevelSuppression()
If this anomaly is suppressed, this field is
true if the suppression is because the pattern is
suppressed. |
Long |
getLastSeen()
The date and time when the anomaly detector most recently saw this anomaly.
|
List<String> |
getLogGroupArnList()
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
|
List<LogEvent> |
getLogSamples()
An array of sample log event messages that are considered to be part of this anomaly.
|
String |
getPatternId()
The ID of the pattern used to help identify this anomaly.
|
String |
getPatternRegex()
The pattern used to help identify this anomaly, in regular expression format.
|
String |
getPatternString()
The pattern used to help identify this anomaly, in string format.
|
List<PatternToken> |
getPatternTokens()
An array of structures where each structure contains information about one token that makes up the pattern.
|
String |
getPriority()
The priority level of this anomaly, as determined by CloudWatch Logs.
|
String |
getState()
Indicates the current state of this anomaly.
|
Boolean |
getSuppressed()
Indicates whether this anomaly is currently suppressed.
|
Long |
getSuppressedDate()
If the anomaly is suppressed, this indicates when it was suppressed.
|
Long |
getSuppressedUntil()
If the anomaly is suppressed, this indicates when the suppression will end.
|
int |
hashCode() |
Boolean |
isActive()
Specifies whether this anomaly is still ongoing.
|
Boolean |
isPatternLevelSuppression()
If this anomaly is suppressed, this field is
true if the suppression is because the pattern is
suppressed. |
Boolean |
isSuppressed()
Indicates whether this anomaly is currently suppressed.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setActive(Boolean active)
Specifies whether this anomaly is still ongoing.
|
void |
setAnomalyDetectorArn(String anomalyDetectorArn)
The ARN of the anomaly detector that identified this anomaly.
|
void |
setAnomalyId(String anomalyId)
The unique ID that CloudWatch Logs assigned to this anomaly.
|
void |
setDescription(String description)
A human-readable description of the anomaly.
|
void |
setFirstSeen(Long firstSeen)
The date and time when the anomaly detector first saw this anomaly.
|
void |
setHistogram(Map<String,Long> histogram)
A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs.
|
void |
setIsPatternLevelSuppression(Boolean isPatternLevelSuppression)
If this anomaly is suppressed, this field is
true if the suppression is because the pattern is
suppressed. |
void |
setLastSeen(Long lastSeen)
The date and time when the anomaly detector most recently saw this anomaly.
|
void |
setLogGroupArnList(Collection<String> logGroupArnList)
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
|
void |
setLogSamples(Collection<LogEvent> logSamples)
An array of sample log event messages that are considered to be part of this anomaly.
|
void |
setPatternId(String patternId)
The ID of the pattern used to help identify this anomaly.
|
void |
setPatternRegex(String patternRegex)
The pattern used to help identify this anomaly, in regular expression format.
|
void |
setPatternString(String patternString)
The pattern used to help identify this anomaly, in string format.
|
void |
setPatternTokens(Collection<PatternToken> patternTokens)
An array of structures where each structure contains information about one token that makes up the pattern.
|
void |
setPriority(String priority)
The priority level of this anomaly, as determined by CloudWatch Logs.
|
void |
setState(String state)
Indicates the current state of this anomaly.
|
void |
setSuppressed(Boolean suppressed)
Indicates whether this anomaly is currently suppressed.
|
void |
setSuppressedDate(Long suppressedDate)
If the anomaly is suppressed, this indicates when it was suppressed.
|
void |
setSuppressedUntil(Long suppressedUntil)
If the anomaly is suppressed, this indicates when the suppression will end.
|
String |
toString()
Returns a string representation of this object.
|
Anomaly |
withActive(Boolean active)
Specifies whether this anomaly is still ongoing.
|
Anomaly |
withAnomalyDetectorArn(String anomalyDetectorArn)
The ARN of the anomaly detector that identified this anomaly.
|
Anomaly |
withAnomalyId(String anomalyId)
The unique ID that CloudWatch Logs assigned to this anomaly.
|
Anomaly |
withDescription(String description)
A human-readable description of the anomaly.
|
Anomaly |
withFirstSeen(Long firstSeen)
The date and time when the anomaly detector first saw this anomaly.
|
Anomaly |
withHistogram(Map<String,Long> histogram)
A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs.
|
Anomaly |
withIsPatternLevelSuppression(Boolean isPatternLevelSuppression)
If this anomaly is suppressed, this field is
true if the suppression is because the pattern is
suppressed. |
Anomaly |
withLastSeen(Long lastSeen)
The date and time when the anomaly detector most recently saw this anomaly.
|
Anomaly |
withLogGroupArnList(Collection<String> logGroupArnList)
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
|
Anomaly |
withLogGroupArnList(String... logGroupArnList)
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
|
Anomaly |
withLogSamples(Collection<LogEvent> logSamples)
An array of sample log event messages that are considered to be part of this anomaly.
|
Anomaly |
withLogSamples(LogEvent... logSamples)
An array of sample log event messages that are considered to be part of this anomaly.
|
Anomaly |
withPatternId(String patternId)
The ID of the pattern used to help identify this anomaly.
|
Anomaly |
withPatternRegex(String patternRegex)
The pattern used to help identify this anomaly, in regular expression format.
|
Anomaly |
withPatternString(String patternString)
The pattern used to help identify this anomaly, in string format.
|
Anomaly |
withPatternTokens(Collection<PatternToken> patternTokens)
An array of structures where each structure contains information about one token that makes up the pattern.
|
Anomaly |
withPatternTokens(PatternToken... patternTokens)
An array of structures where each structure contains information about one token that makes up the pattern.
|
Anomaly |
withPriority(String priority)
The priority level of this anomaly, as determined by CloudWatch Logs.
|
Anomaly |
withState(State state)
Indicates the current state of this anomaly.
|
Anomaly |
withState(String state)
Indicates the current state of this anomaly.
|
Anomaly |
withSuppressed(Boolean suppressed)
Indicates whether this anomaly is currently suppressed.
|
Anomaly |
withSuppressedDate(Long suppressedDate)
If the anomaly is suppressed, this indicates when it was suppressed.
|
Anomaly |
withSuppressedUntil(Long suppressedUntil)
If the anomaly is suppressed, this indicates when the suppression will end.
|
public void setAnomalyId(String anomalyId)
The unique ID that CloudWatch Logs assigned to this anomaly.
anomalyId
- The unique ID that CloudWatch Logs assigned to this anomaly.public String getAnomalyId()
The unique ID that CloudWatch Logs assigned to this anomaly.
public Anomaly withAnomalyId(String anomalyId)
The unique ID that CloudWatch Logs assigned to this anomaly.
anomalyId
- The unique ID that CloudWatch Logs assigned to this anomaly.public void setPatternId(String patternId)
The ID of the pattern used to help identify this anomaly.
patternId
- The ID of the pattern used to help identify this anomaly.public String getPatternId()
The ID of the pattern used to help identify this anomaly.
public Anomaly withPatternId(String patternId)
The ID of the pattern used to help identify this anomaly.
patternId
- The ID of the pattern used to help identify this anomaly.public void setAnomalyDetectorArn(String anomalyDetectorArn)
The ARN of the anomaly detector that identified this anomaly.
anomalyDetectorArn
- The ARN of the anomaly detector that identified this anomaly.public String getAnomalyDetectorArn()
The ARN of the anomaly detector that identified this anomaly.
public Anomaly withAnomalyDetectorArn(String anomalyDetectorArn)
The ARN of the anomaly detector that identified this anomaly.
anomalyDetectorArn
- The ARN of the anomaly detector that identified this anomaly.public void setPatternString(String patternString)
The pattern used to help identify this anomaly, in string format.
patternString
- The pattern used to help identify this anomaly, in string format.public String getPatternString()
The pattern used to help identify this anomaly, in string format.
public Anomaly withPatternString(String patternString)
The pattern used to help identify this anomaly, in string format.
patternString
- The pattern used to help identify this anomaly, in string format.public void setPatternRegex(String patternRegex)
The pattern used to help identify this anomaly, in regular expression format.
patternRegex
- The pattern used to help identify this anomaly, in regular expression format.public String getPatternRegex()
The pattern used to help identify this anomaly, in regular expression format.
public Anomaly withPatternRegex(String patternRegex)
The pattern used to help identify this anomaly, in regular expression format.
patternRegex
- The pattern used to help identify this anomaly, in regular expression format.public void setPriority(String priority)
The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log severity
labels such as FATAL
and ERROR
and the amount of deviation from the baseline. Possible
values are HIGH
, MEDIUM
, and LOW
.
priority
- The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log
severity labels such as FATAL
and ERROR
and the amount of deviation from the
baseline. Possible values are HIGH
, MEDIUM
, and LOW
.public String getPriority()
The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log severity
labels such as FATAL
and ERROR
and the amount of deviation from the baseline. Possible
values are HIGH
, MEDIUM
, and LOW
.
FATAL
and ERROR
and the amount of deviation from the
baseline. Possible values are HIGH
, MEDIUM
, and LOW
.public Anomaly withPriority(String priority)
The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log severity
labels such as FATAL
and ERROR
and the amount of deviation from the baseline. Possible
values are HIGH
, MEDIUM
, and LOW
.
priority
- The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log
severity labels such as FATAL
and ERROR
and the amount of deviation from the
baseline. Possible values are HIGH
, MEDIUM
, and LOW
.public void setFirstSeen(Long firstSeen)
The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which is the
number of seconds since January 1, 1970, 00:00:00 UTC
.
firstSeen
- The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which
is the number of seconds since January 1, 1970, 00:00:00 UTC
.public Long getFirstSeen()
The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which is the
number of seconds since January 1, 1970, 00:00:00 UTC
.
January 1, 1970, 00:00:00 UTC
.public Anomaly withFirstSeen(Long firstSeen)
The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which is the
number of seconds since January 1, 1970, 00:00:00 UTC
.
firstSeen
- The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which
is the number of seconds since January 1, 1970, 00:00:00 UTC
.public void setLastSeen(Long lastSeen)
The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time, which
is the number of seconds since January 1, 1970, 00:00:00 UTC
.
lastSeen
- The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time,
which is the number of seconds since January 1, 1970, 00:00:00 UTC
.public Long getLastSeen()
The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time, which
is the number of seconds since January 1, 1970, 00:00:00 UTC
.
January 1, 1970, 00:00:00 UTC
.public Anomaly withLastSeen(Long lastSeen)
The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time, which
is the number of seconds since January 1, 1970, 00:00:00 UTC
.
lastSeen
- The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time,
which is the number of seconds since January 1, 1970, 00:00:00 UTC
.public void setDescription(String description)
A human-readable description of the anomaly. This description is generated by CloudWatch Logs.
description
- A human-readable description of the anomaly. This description is generated by CloudWatch Logs.public String getDescription()
A human-readable description of the anomaly. This description is generated by CloudWatch Logs.
public Anomaly withDescription(String description)
A human-readable description of the anomaly. This description is generated by CloudWatch Logs.
description
- A human-readable description of the anomaly. This description is generated by CloudWatch Logs.public void setActive(Boolean active)
Specifies whether this anomaly is still ongoing.
active
- Specifies whether this anomaly is still ongoing.public Boolean getActive()
Specifies whether this anomaly is still ongoing.
public Anomaly withActive(Boolean active)
Specifies whether this anomaly is still ongoing.
active
- Specifies whether this anomaly is still ongoing.public Boolean isActive()
Specifies whether this anomaly is still ongoing.
public void setState(String state)
Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to be
normal, the value is Baseline
.
state
- Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to
be normal, the value is Baseline
.State
public String getState()
Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to be
normal, the value is Baseline
.
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to
be normal, the value is Baseline
.State
public Anomaly withState(String state)
Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to be
normal, the value is Baseline
.
state
- Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to
be normal, the value is Baseline
.State
public Anomaly withState(State state)
Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to be
normal, the value is Baseline
.
state
- Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is
Active
. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed
. If this behavior is now considered to
be normal, the value is Baseline
.State
public Map<String,Long> getHistogram()
A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs. The times are specified in epoch time, which is the number of seconds since
January 1, 1970, 00:00:00 UTC
.
January 1, 1970, 00:00:00 UTC
.public void setHistogram(Map<String,Long> histogram)
A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs. The times are specified in epoch time, which is the number of seconds since
January 1, 1970, 00:00:00 UTC
.
histogram
- A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs. The times are specified in epoch time, which is the number of seconds
since January 1, 1970, 00:00:00 UTC
.public Anomaly withHistogram(Map<String,Long> histogram)
A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs. The times are specified in epoch time, which is the number of seconds since
January 1, 1970, 00:00:00 UTC
.
histogram
- A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were
detected at each of those runs. The times are specified in epoch time, which is the number of seconds
since January 1, 1970, 00:00:00 UTC
.public Anomaly addHistogramEntry(String key, Long value)
public Anomaly clearHistogramEntries()
public List<LogEvent> getLogSamples()
An array of sample log event messages that are considered to be part of this anomaly.
public void setLogSamples(Collection<LogEvent> logSamples)
An array of sample log event messages that are considered to be part of this anomaly.
logSamples
- An array of sample log event messages that are considered to be part of this anomaly.public Anomaly withLogSamples(LogEvent... logSamples)
An array of sample log event messages that are considered to be part of this anomaly.
NOTE: This method appends the values to the existing list (if any). Use
setLogSamples(java.util.Collection)
or withLogSamples(java.util.Collection)
if you want to
override the existing values.
logSamples
- An array of sample log event messages that are considered to be part of this anomaly.public Anomaly withLogSamples(Collection<LogEvent> logSamples)
An array of sample log event messages that are considered to be part of this anomaly.
logSamples
- An array of sample log event messages that are considered to be part of this anomaly.public List<PatternToken> getPatternTokens()
An array of structures where each structure contains information about one token that makes up the pattern.
public void setPatternTokens(Collection<PatternToken> patternTokens)
An array of structures where each structure contains information about one token that makes up the pattern.
patternTokens
- An array of structures where each structure contains information about one token that makes up the
pattern.public Anomaly withPatternTokens(PatternToken... patternTokens)
An array of structures where each structure contains information about one token that makes up the pattern.
NOTE: This method appends the values to the existing list (if any). Use
setPatternTokens(java.util.Collection)
or withPatternTokens(java.util.Collection)
if you want
to override the existing values.
patternTokens
- An array of structures where each structure contains information about one token that makes up the
pattern.public Anomaly withPatternTokens(Collection<PatternToken> patternTokens)
An array of structures where each structure contains information about one token that makes up the pattern.
patternTokens
- An array of structures where each structure contains information about one token that makes up the
pattern.public List<String> getLogGroupArnList()
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
public void setLogGroupArnList(Collection<String> logGroupArnList)
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
logGroupArnList
- An array of ARNS of the log groups that contained log events considered to be part of this anomaly.public Anomaly withLogGroupArnList(String... logGroupArnList)
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
NOTE: This method appends the values to the existing list (if any). Use
setLogGroupArnList(java.util.Collection)
or withLogGroupArnList(java.util.Collection)
if you
want to override the existing values.
logGroupArnList
- An array of ARNS of the log groups that contained log events considered to be part of this anomaly.public Anomaly withLogGroupArnList(Collection<String> logGroupArnList)
An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
logGroupArnList
- An array of ARNS of the log groups that contained log events considered to be part of this anomaly.public void setSuppressed(Boolean suppressed)
Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.
suppressed
- Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.public Boolean getSuppressed()
Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.
public Anomaly withSuppressed(Boolean suppressed)
Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.
suppressed
- Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.public Boolean isSuppressed()
Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.
public void setSuppressedDate(Long suppressedDate)
If the anomaly is suppressed, this indicates when it was suppressed.
suppressedDate
- If the anomaly is suppressed, this indicates when it was suppressed.public Long getSuppressedDate()
If the anomaly is suppressed, this indicates when it was suppressed.
public Anomaly withSuppressedDate(Long suppressedDate)
If the anomaly is suppressed, this indicates when it was suppressed.
suppressedDate
- If the anomaly is suppressed, this indicates when it was suppressed.public void setSuppressedUntil(Long suppressedUntil)
If the anomaly is suppressed, this indicates when the suppression will end. If this value is 0
, the
anomaly was suppressed with no expiration, with the INFINITE
value.
suppressedUntil
- If the anomaly is suppressed, this indicates when the suppression will end. If this value is
0
, the anomaly was suppressed with no expiration, with the INFINITE
value.public Long getSuppressedUntil()
If the anomaly is suppressed, this indicates when the suppression will end. If this value is 0
, the
anomaly was suppressed with no expiration, with the INFINITE
value.
0
, the anomaly was suppressed with no expiration, with the INFINITE
value.public Anomaly withSuppressedUntil(Long suppressedUntil)
If the anomaly is suppressed, this indicates when the suppression will end. If this value is 0
, the
anomaly was suppressed with no expiration, with the INFINITE
value.
suppressedUntil
- If the anomaly is suppressed, this indicates when the suppression will end. If this value is
0
, the anomaly was suppressed with no expiration, with the INFINITE
value.public void setIsPatternLevelSuppression(Boolean isPatternLevelSuppression)
If this anomaly is suppressed, this field is true
if the suppression is because the pattern is
suppressed. If false
, then only this particular anomaly is suppressed.
isPatternLevelSuppression
- If this anomaly is suppressed, this field is true
if the suppression is because the pattern
is suppressed. If false
, then only this particular anomaly is suppressed.public Boolean getIsPatternLevelSuppression()
If this anomaly is suppressed, this field is true
if the suppression is because the pattern is
suppressed. If false
, then only this particular anomaly is suppressed.
true
if the suppression is because the pattern
is suppressed. If false
, then only this particular anomaly is suppressed.public Anomaly withIsPatternLevelSuppression(Boolean isPatternLevelSuppression)
If this anomaly is suppressed, this field is true
if the suppression is because the pattern is
suppressed. If false
, then only this particular anomaly is suppressed.
isPatternLevelSuppression
- If this anomaly is suppressed, this field is true
if the suppression is because the pattern
is suppressed. If false
, then only this particular anomaly is suppressed.public Boolean isPatternLevelSuppression()
If this anomaly is suppressed, this field is true
if the suppression is because the pattern is
suppressed. If false
, then only this particular anomaly is suppressed.
true
if the suppression is because the pattern
is suppressed. If false
, then only this particular anomaly is suppressed.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.