#[non_exhaustive]pub struct LogAlarm {Show 22 fields
pub alarm_name: Option<String>,
pub alarm_arn: Option<String>,
pub alarm_description: Option<String>,
pub alarm_configuration_updated_timestamp: Option<DateTime>,
pub actions_enabled: Option<bool>,
pub ok_actions: Option<Vec<String>>,
pub alarm_actions: Option<Vec<String>>,
pub insufficient_data_actions: Option<Vec<String>>,
pub state_value: Option<StateValue>,
pub state_reason: Option<String>,
pub state_reason_data: Option<String>,
pub state_updated_timestamp: Option<DateTime>,
pub scheduled_query_configuration: Option<ScheduledQueryConfiguration>,
pub query_results_to_evaluate: Option<i32>,
pub query_results_to_alarm: Option<i32>,
pub threshold: Option<f64>,
pub comparison_operator: Option<ComparisonOperator>,
pub treat_missing_data: Option<String>,
pub state_transitioned_timestamp: Option<DateTime>,
pub evaluation_state: Option<EvaluationState>,
pub action_log_line_count: Option<i32>,
pub action_log_line_role_arn: Option<String>,
}Expand description
The details about a log alarm.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.alarm_name: Option<String>The name of the alarm.
alarm_arn: Option<String>The Amazon Resource Name (ARN) of the alarm.
alarm_description: Option<String>The description of the alarm.
alarm_configuration_updated_timestamp: Option<DateTime>The time stamp of the last update to the alarm configuration.
actions_enabled: Option<bool>Indicates whether actions should be executed during any changes to the alarm state.
ok_actions: Option<Vec<String>>The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
alarm_actions: Option<Vec<String>>The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
insufficient_data_actions: Option<Vec<String>>The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
state_value: Option<StateValue>The state value for the alarm.
state_reason: Option<String>An explanation for the alarm state, in text format.
state_reason_data: Option<String>An explanation for the alarm state, in JSON format.
state_updated_timestamp: Option<DateTime>The time stamp of the last update to the value of either the StateValue or EvaluationState parameters.
scheduled_query_configuration: Option<ScheduledQueryConfiguration>The configuration of the underlying CloudWatch Logs scheduled query, including the query string, log groups, schedule, aggregation expression, and the ARN of the managed scheduled query.
query_results_to_evaluate: Option<i32>The number of most recent scheduled query results that the alarm evaluates against the threshold (the N in M-of-N evaluation).
query_results_to_alarm: Option<i32>The number of query results, out of the most recent QueryResultsToEvaluate results, that must breach the threshold to trigger the alarm to transition to ALARM (the M in M-of-N evaluation).
threshold: Option<f64>The value to compare with the aggregated query result.
comparison_operator: Option<ComparisonOperator>The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand.
treat_missing_data: Option<String>How this alarm handles missing data points. Valid values are breaching, notBreaching, ignore, and missing.
state_transitioned_timestamp: Option<DateTime>The date and time that the alarm's StateValue most recently changed.
evaluation_state: Option<EvaluationState>If the value of this field is EVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction. Refer to the StateReason field of the alarm for more details.
If the value of this field is EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved.
If the value of this field is PARTIAL_DATA, it indicates that the query returned the maximum 500 contributor groups but more matched. The alarm evaluates the available contributors, but results might be incomplete.
action_log_line_count: Option<i32>The number of log lines from the most recent scheduled query execution that are included in alarm action notifications. Valid range is 0 through 50. A value of 0 means no log lines are included.
action_log_line_role_arn: Option<String>The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Set when ActionLogLineCount is greater than 0.
Implementations§
Source§impl LogAlarm
impl LogAlarm
Sourcepub fn alarm_name(&self) -> Option<&str>
pub fn alarm_name(&self) -> Option<&str>
The name of the alarm.
Sourcepub fn alarm_description(&self) -> Option<&str>
pub fn alarm_description(&self) -> Option<&str>
The description of the alarm.
Sourcepub fn alarm_configuration_updated_timestamp(&self) -> Option<&DateTime>
pub fn alarm_configuration_updated_timestamp(&self) -> Option<&DateTime>
The time stamp of the last update to the alarm configuration.
Sourcepub fn actions_enabled(&self) -> Option<bool>
pub fn actions_enabled(&self) -> Option<bool>
Indicates whether actions should be executed during any changes to the alarm state.
Sourcepub fn ok_actions(&self) -> &[String]
pub fn ok_actions(&self) -> &[String]
The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .ok_actions.is_none().
Sourcepub fn alarm_actions(&self) -> &[String]
pub fn alarm_actions(&self) -> &[String]
The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .alarm_actions.is_none().
Sourcepub fn insufficient_data_actions(&self) -> &[String]
pub fn insufficient_data_actions(&self) -> &[String]
The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .insufficient_data_actions.is_none().
Sourcepub fn state_value(&self) -> Option<&StateValue>
pub fn state_value(&self) -> Option<&StateValue>
The state value for the alarm.
Sourcepub fn state_reason(&self) -> Option<&str>
pub fn state_reason(&self) -> Option<&str>
An explanation for the alarm state, in text format.
Sourcepub fn state_reason_data(&self) -> Option<&str>
pub fn state_reason_data(&self) -> Option<&str>
An explanation for the alarm state, in JSON format.
Sourcepub fn state_updated_timestamp(&self) -> Option<&DateTime>
pub fn state_updated_timestamp(&self) -> Option<&DateTime>
The time stamp of the last update to the value of either the StateValue or EvaluationState parameters.
Sourcepub fn scheduled_query_configuration(
&self,
) -> Option<&ScheduledQueryConfiguration>
pub fn scheduled_query_configuration( &self, ) -> Option<&ScheduledQueryConfiguration>
The configuration of the underlying CloudWatch Logs scheduled query, including the query string, log groups, schedule, aggregation expression, and the ARN of the managed scheduled query.
Sourcepub fn query_results_to_evaluate(&self) -> Option<i32>
pub fn query_results_to_evaluate(&self) -> Option<i32>
The number of most recent scheduled query results that the alarm evaluates against the threshold (the N in M-of-N evaluation).
Sourcepub fn query_results_to_alarm(&self) -> Option<i32>
pub fn query_results_to_alarm(&self) -> Option<i32>
The number of query results, out of the most recent QueryResultsToEvaluate results, that must breach the threshold to trigger the alarm to transition to ALARM (the M in M-of-N evaluation).
Sourcepub fn comparison_operator(&self) -> Option<&ComparisonOperator>
pub fn comparison_operator(&self) -> Option<&ComparisonOperator>
The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand.
Sourcepub fn treat_missing_data(&self) -> Option<&str>
pub fn treat_missing_data(&self) -> Option<&str>
How this alarm handles missing data points. Valid values are breaching, notBreaching, ignore, and missing.
Sourcepub fn state_transitioned_timestamp(&self) -> Option<&DateTime>
pub fn state_transitioned_timestamp(&self) -> Option<&DateTime>
The date and time that the alarm's StateValue most recently changed.
Sourcepub fn evaluation_state(&self) -> Option<&EvaluationState>
pub fn evaluation_state(&self) -> Option<&EvaluationState>
If the value of this field is EVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction. Refer to the StateReason field of the alarm for more details.
If the value of this field is EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved.
If the value of this field is PARTIAL_DATA, it indicates that the query returned the maximum 500 contributor groups but more matched. The alarm evaluates the available contributors, but results might be incomplete.
Sourcepub fn action_log_line_count(&self) -> Option<i32>
pub fn action_log_line_count(&self) -> Option<i32>
The number of log lines from the most recent scheduled query execution that are included in alarm action notifications. Valid range is 0 through 50. A value of 0 means no log lines are included.
Sourcepub fn action_log_line_role_arn(&self) -> Option<&str>
pub fn action_log_line_role_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Set when ActionLogLineCount is greater than 0.
Trait Implementations§
impl StructuralPartialEq for LogAlarm
Auto Trait Implementations§
impl Freeze for LogAlarm
impl RefUnwindSafe for LogAlarm
impl Send for LogAlarm
impl Sync for LogAlarm
impl Unpin for LogAlarm
impl UnsafeUnpin for LogAlarm
impl UnwindSafe for LogAlarm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);