Struct aws_sdk_cloudwatchlogs::types::Anomaly

source ·
#[non_exhaustive]
pub struct Anomaly {
Show 19 fields pub anomaly_id: String, pub pattern_id: String, pub anomaly_detector_arn: String, pub pattern_string: String, pub pattern_regex: Option<String>, pub priority: Option<String>, pub first_seen: i64, pub last_seen: i64, pub description: String, pub active: bool, pub state: State, pub histogram: HashMap<String, i64>, pub log_samples: Vec<LogEvent>, pub pattern_tokens: Vec<PatternToken>, pub log_group_arn_list: Vec<String>, pub suppressed: Option<bool>, pub suppressed_date: i64, pub suppressed_until: i64, pub is_pattern_level_suppression: Option<bool>,
}
Expand description

This structure represents one anomaly that has been found by a logs anomaly detector.

For more information about patterns and anomalies, see CreateLogAnomalyDetector.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§anomaly_id: String

The unique ID that CloudWatch Logs assigned to this anomaly.

§pattern_id: String

The ID of the pattern used to help identify this anomaly.

§anomaly_detector_arn: String

The ARN of the anomaly detector that identified this anomaly.

§pattern_string: String

The pattern used to help identify this anomaly, in string format.

§pattern_regex: Option<String>

The pattern used to help identify this anomaly, in regular expression format.

§priority: Option<String>

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.

§first_seen: i64

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.

§last_seen: i64

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.

§description: String

A human-readable description of the anomaly. This description is generated by CloudWatch Logs.

§active: bool

Specifies whether this anomaly is still ongoing.

§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.

§histogram: HashMap<String, i64>

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.

§log_samples: Vec<LogEvent>

An array of sample log event messages that are considered to be part of this anomaly.

§pattern_tokens: Vec<PatternToken>

An array of structures where each structure contains information about one token that makes up the pattern.

§log_group_arn_list: Vec<String>

An array of ARNS of the log groups that contained log events considered to be part of this anomaly.

§suppressed: Option<bool>

Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.

§suppressed_date: i64

If the anomaly is suppressed, this indicates when it was suppressed.

§suppressed_until: i64

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.

§is_pattern_level_suppression: Option<bool>

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.

Implementations§

source§

impl Anomaly

source

pub fn anomaly_id(&self) -> &str

The unique ID that CloudWatch Logs assigned to this anomaly.

source

pub fn pattern_id(&self) -> &str

The ID of the pattern used to help identify this anomaly.

source

pub fn anomaly_detector_arn(&self) -> &str

The ARN of the anomaly detector that identified this anomaly.

source

pub fn pattern_string(&self) -> &str

The pattern used to help identify this anomaly, in string format.

source

pub fn pattern_regex(&self) -> Option<&str>

The pattern used to help identify this anomaly, in regular expression format.

source

pub fn priority(&self) -> Option<&str>

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.

source

pub fn first_seen(&self) -> i64

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.

source

pub fn last_seen(&self) -> i64

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.

source

pub fn description(&self) -> &str

A human-readable description of the anomaly. This description is generated by CloudWatch Logs.

source

pub fn active(&self) -> bool

Specifies whether this anomaly is still ongoing.

source

pub fn state(&self) -> &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.

source

pub fn histogram(&self) -> &HashMap<String, i64>

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.

source

pub fn log_samples(&self) -> &[LogEvent]

An array of sample log event messages that are considered to be part of this anomaly.

source

pub fn pattern_tokens(&self) -> &[PatternToken]

An array of structures where each structure contains information about one token that makes up the pattern.

source

pub fn log_group_arn_list(&self) -> &[String]

An array of ARNS of the log groups that contained log events considered to be part of this anomaly.

source

pub fn suppressed(&self) -> Option<bool>

Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.

source

pub fn suppressed_date(&self) -> i64

If the anomaly is suppressed, this indicates when it was suppressed.

source

pub fn suppressed_until(&self) -> i64

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.

source

pub fn is_pattern_level_suppression(&self) -> Option<bool>

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.

source§

impl Anomaly

source

pub fn builder() -> AnomalyBuilder

Creates a new builder-style object to manufacture Anomaly.

Trait Implementations§

source§

impl Clone for Anomaly

source§

fn clone(&self) -> Anomaly

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Anomaly

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Anomaly

source§

fn eq(&self, other: &Anomaly) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Anomaly

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more