#[non_exhaustive]pub struct CompositeAlarm {Show 19 fields
pub actions_enabled: Option<bool>,
pub alarm_actions: Option<Vec<String>>,
pub alarm_arn: Option<String>,
pub alarm_configuration_updated_timestamp: Option<DateTime>,
pub alarm_description: Option<String>,
pub alarm_name: Option<String>,
pub alarm_rule: Option<String>,
pub insufficient_data_actions: Option<Vec<String>>,
pub ok_actions: Option<Vec<String>>,
pub state_reason: Option<String>,
pub state_reason_data: Option<String>,
pub state_updated_timestamp: Option<DateTime>,
pub state_value: Option<StateValue>,
pub state_transitioned_timestamp: Option<DateTime>,
pub actions_suppressed_by: Option<ActionsSuppressedBy>,
pub actions_suppressed_reason: Option<String>,
pub actions_suppressor: Option<String>,
pub actions_suppressor_wait_period: Option<i32>,
pub actions_suppressor_extension_period: Option<i32>,
}
Expand description
The details about a composite 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.actions_enabled: Option<bool>
Indicates whether actions should be executed during any changes to the alarm state.
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).
alarm_arn: Option<String>
The Amazon Resource Name (ARN) of the alarm.
alarm_configuration_updated_timestamp: Option<DateTime>
The time stamp of the last update to the alarm configuration.
alarm_description: Option<String>
The description of the alarm.
alarm_name: Option<String>
The name of the alarm.
alarm_rule: Option<String>
The rule that this alarm uses to evaluate its alarm state.
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).
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).
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>
Tracks the timestamp of any state update, even if StateValue
doesn't change.
state_value: Option<StateValue>
The state value for the alarm.
state_transitioned_timestamp: Option<DateTime>
The timestamp of the last change to the alarm's StateValue
.
actions_suppressed_by: Option<ActionsSuppressedBy>
When the value is ALARM
, it means that the actions are suppressed because the suppressor alarm is in ALARM
When the value is WaitPeriod
, it means that the actions are suppressed because the composite alarm is waiting for the suppressor alarm to go into into the ALARM
state. The maximum waiting time is as specified in ActionsSuppressorWaitPeriod
. After this time, the composite alarm performs its actions. When the value is ExtensionPeriod
, it means that the actions are suppressed because the composite alarm is waiting after the suppressor alarm went out of the ALARM
state. The maximum waiting time is as specified in ActionsSuppressorExtensionPeriod
. After this time, the composite alarm performs its actions.
actions_suppressed_reason: Option<String>
Captures the reason for action suppression.
actions_suppressor: Option<String>
Actions will be suppressed if the suppressor alarm is in the ALARM
state. ActionsSuppressor
can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
actions_suppressor_wait_period: Option<i32>
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the ALARM
state. After this time, the composite alarm performs its actions.
WaitPeriod
is required only when ActionsSuppressor
is specified.
actions_suppressor_extension_period: Option<i32>
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the ALARM
state. After this time, the composite alarm performs its actions.
ExtensionPeriod
is required only when ActionsSuppressor
is specified.
Implementations§
Source§impl CompositeAlarm
impl CompositeAlarm
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 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 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 alarm_description(&self) -> Option<&str>
pub fn alarm_description(&self) -> Option<&str>
The description of the alarm.
Sourcepub fn alarm_name(&self) -> Option<&str>
pub fn alarm_name(&self) -> Option<&str>
The name of the alarm.
Sourcepub fn alarm_rule(&self) -> Option<&str>
pub fn alarm_rule(&self) -> Option<&str>
The rule that this alarm uses to evaluate its alarm state.
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 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 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>
Tracks the timestamp of any state update, even if StateValue
doesn't change.
Sourcepub fn state_value(&self) -> Option<&StateValue>
pub fn state_value(&self) -> Option<&StateValue>
The state value for the alarm.
Sourcepub fn state_transitioned_timestamp(&self) -> Option<&DateTime>
pub fn state_transitioned_timestamp(&self) -> Option<&DateTime>
The timestamp of the last change to the alarm's StateValue
.
Sourcepub fn actions_suppressed_by(&self) -> Option<&ActionsSuppressedBy>
pub fn actions_suppressed_by(&self) -> Option<&ActionsSuppressedBy>
When the value is ALARM
, it means that the actions are suppressed because the suppressor alarm is in ALARM
When the value is WaitPeriod
, it means that the actions are suppressed because the composite alarm is waiting for the suppressor alarm to go into into the ALARM
state. The maximum waiting time is as specified in ActionsSuppressorWaitPeriod
. After this time, the composite alarm performs its actions. When the value is ExtensionPeriod
, it means that the actions are suppressed because the composite alarm is waiting after the suppressor alarm went out of the ALARM
state. The maximum waiting time is as specified in ActionsSuppressorExtensionPeriod
. After this time, the composite alarm performs its actions.
Sourcepub fn actions_suppressed_reason(&self) -> Option<&str>
pub fn actions_suppressed_reason(&self) -> Option<&str>
Captures the reason for action suppression.
Sourcepub fn actions_suppressor(&self) -> Option<&str>
pub fn actions_suppressor(&self) -> Option<&str>
Actions will be suppressed if the suppressor alarm is in the ALARM
state. ActionsSuppressor
can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
Sourcepub fn actions_suppressor_wait_period(&self) -> Option<i32>
pub fn actions_suppressor_wait_period(&self) -> Option<i32>
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the ALARM
state. After this time, the composite alarm performs its actions.
WaitPeriod
is required only when ActionsSuppressor
is specified.
Sourcepub fn actions_suppressor_extension_period(&self) -> Option<i32>
pub fn actions_suppressor_extension_period(&self) -> Option<i32>
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the ALARM
state. After this time, the composite alarm performs its actions.
ExtensionPeriod
is required only when ActionsSuppressor
is specified.
Source§impl CompositeAlarm
impl CompositeAlarm
Sourcepub fn builder() -> CompositeAlarmBuilder
pub fn builder() -> CompositeAlarmBuilder
Creates a new builder-style object to manufacture CompositeAlarm
.
Trait Implementations§
Source§impl Clone for CompositeAlarm
impl Clone for CompositeAlarm
Source§fn clone(&self) -> CompositeAlarm
fn clone(&self) -> CompositeAlarm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CompositeAlarm
impl Debug for CompositeAlarm
Source§impl PartialEq for CompositeAlarm
impl PartialEq for CompositeAlarm
impl StructuralPartialEq for CompositeAlarm
Auto Trait Implementations§
impl Freeze for CompositeAlarm
impl RefUnwindSafe for CompositeAlarm
impl Send for CompositeAlarm
impl Sync for CompositeAlarm
impl Unpin for CompositeAlarm
impl UnwindSafe for CompositeAlarm
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
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>
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);