#[non_exhaustive]
pub struct AnomalyBuilder { /* private fields */ }
Expand description

A builder for Anomaly.

Implementations§

source§

impl AnomalyBuilder

source

pub fn anomaly_id(self, input: impl Into<String>) -> Self

The unique ID that CloudWatch Logs assigned to this anomaly.

This field is required.
source

pub fn set_anomaly_id(self, input: Option<String>) -> Self

The unique ID that CloudWatch Logs assigned to this anomaly.

source

pub fn get_anomaly_id(&self) -> &Option<String>

The unique ID that CloudWatch Logs assigned to this anomaly.

source

pub fn pattern_id(self, input: impl Into<String>) -> Self

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

This field is required.
source

pub fn set_pattern_id(self, input: Option<String>) -> Self

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

source

pub fn get_pattern_id(&self) -> &Option<String>

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

source

pub fn anomaly_detector_arn(self, input: impl Into<String>) -> Self

The ARN of the anomaly detector that identified this anomaly.

This field is required.
source

pub fn set_anomaly_detector_arn(self, input: Option<String>) -> Self

The ARN of the anomaly detector that identified this anomaly.

source

pub fn get_anomaly_detector_arn(&self) -> &Option<String>

The ARN of the anomaly detector that identified this anomaly.

source

pub fn pattern_string(self, input: impl Into<String>) -> Self

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

This field is required.
source

pub fn set_pattern_string(self, input: Option<String>) -> Self

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

source

pub fn get_pattern_string(&self) -> &Option<String>

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

source

pub fn pattern_regex(self, input: impl Into<String>) -> Self

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

source

pub fn set_pattern_regex(self, input: Option<String>) -> Self

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

source

pub fn get_pattern_regex(&self) -> &Option<String>

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

source

pub fn priority(self, input: impl Into<String>) -> Self

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 set_priority(self, input: Option<String>) -> Self

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 get_priority(&self) -> &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.

source

pub fn first_seen(self, input: i64) -> Self

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.

This field is required.
source

pub fn set_first_seen(self, input: Option<i64>) -> Self

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 get_first_seen(&self) -> &Option<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, input: i64) -> Self

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.

This field is required.
source

pub fn set_last_seen(self, input: Option<i64>) -> Self

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 get_last_seen(&self) -> &Option<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, input: impl Into<String>) -> Self

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

This field is required.
source

pub fn set_description(self, input: Option<String>) -> Self

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

source

pub fn get_description(&self) -> &Option<String>

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

source

pub fn active(self, input: bool) -> Self

Specifies whether this anomaly is still ongoing.

This field is required.
source

pub fn set_active(self, input: Option<bool>) -> Self

Specifies whether this anomaly is still ongoing.

source

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

Specifies whether this anomaly is still ongoing.

source

pub fn state(self, input: State) -> Self

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.

This field is required.
source

pub fn set_state(self, input: Option<State>) -> Self

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 get_state(&self) -> &Option<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, k: impl Into<String>, v: i64) -> Self

Adds a key-value pair to histogram.

To override the contents of this collection use set_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.

source

pub fn set_histogram(self, input: Option<HashMap<String, i64>>) -> Self

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 get_histogram(&self) -> &Option<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, input: LogEvent) -> Self

Appends an item to log_samples.

To override the contents of this collection use set_log_samples.

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

source

pub fn set_log_samples(self, input: Option<Vec<LogEvent>>) -> Self

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

source

pub fn get_log_samples(&self) -> &Option<Vec<LogEvent>>

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

source

pub fn pattern_tokens(self, input: PatternToken) -> Self

Appends an item to pattern_tokens.

To override the contents of this collection use set_pattern_tokens.

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

source

pub fn set_pattern_tokens(self, input: Option<Vec<PatternToken>>) -> Self

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

source

pub fn get_pattern_tokens(&self) -> &Option<Vec<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, input: impl Into<String>) -> Self

Appends an item to log_group_arn_list.

To override the contents of this collection use set_log_group_arn_list.

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

source

pub fn set_log_group_arn_list(self, input: Option<Vec<String>>) -> Self

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

source

pub fn get_log_group_arn_list(&self) -> &Option<Vec<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, input: bool) -> Self

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

source

pub fn set_suppressed(self, input: Option<bool>) -> Self

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

source

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

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

source

pub fn suppressed_date(self, input: i64) -> Self

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

source

pub fn set_suppressed_date(self, input: Option<i64>) -> Self

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

source

pub fn get_suppressed_date(&self) -> &Option<i64>

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

source

pub fn suppressed_until(self, input: i64) -> Self

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 set_suppressed_until(self, input: Option<i64>) -> Self

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 get_suppressed_until(&self) -> &Option<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, input: bool) -> Self

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

pub fn set_is_pattern_level_suppression(self, input: Option<bool>) -> Self

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

pub fn get_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

pub fn build(self) -> Result<Anomaly, BuildError>

Consumes the builder and constructs a Anomaly. This method will fail if any of the following fields are not set:

Trait Implementations§

source§

impl Clone for AnomalyBuilder

source§

fn clone(&self) -> AnomalyBuilder

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 AnomalyBuilder

source§

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

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

impl Default for AnomalyBuilder

source§

fn default() -> AnomalyBuilder

Returns the “default value” for a type. Read more
source§

impl PartialEq for AnomalyBuilder

source§

fn eq(&self, other: &AnomalyBuilder) -> 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 AnomalyBuilder

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