Struct rusoto_lightsail::Alarm
source · [−]pub struct Alarm {Show 20 fields
pub arn: Option<String>,
pub comparison_operator: Option<String>,
pub contact_protocols: Option<Vec<String>>,
pub created_at: Option<f64>,
pub datapoints_to_alarm: Option<i64>,
pub evaluation_periods: Option<i64>,
pub location: Option<ResourceLocation>,
pub metric_name: Option<String>,
pub monitored_resource_info: Option<MonitoredResourceInfo>,
pub name: Option<String>,
pub notification_enabled: Option<bool>,
pub notification_triggers: Option<Vec<String>>,
pub period: Option<i64>,
pub resource_type: Option<String>,
pub state: Option<String>,
pub statistic: Option<String>,
pub support_code: Option<String>,
pub threshold: Option<f64>,
pub treat_missing_data: Option<String>,
pub unit: Option<String>,
}
Expand description
Describes an alarm.
An alarm is a way to monitor your Amazon Lightsail resource metrics. For more information, see Alarms in Amazon Lightsail.
Fields
arn: Option<String>
The Amazon Resource Name (ARN) of the alarm.
comparison_operator: Option<String>
The arithmetic operation used when comparing the specified statistic and threshold.
contact_protocols: Option<Vec<String>>
The contact protocols for the alarm, such as Email
, SMS
(text messaging), or both.
created_at: Option<f64>
The timestamp when the alarm was created.
datapoints_to_alarm: Option<i64>
The number of data points that must not within the specified threshold to trigger the alarm.
evaluation_periods: Option<i64>
The number of periods over which data is compared to the specified threshold.
location: Option<ResourceLocation>
An object that lists information about the location of the alarm.
metric_name: Option<String>
The name of the metric associated with the alarm.
monitored_resource_info: Option<MonitoredResourceInfo>
An object that lists information about the resource monitored by the alarm.
name: Option<String>
The name of the alarm.
notification_enabled: Option<bool>
Indicates whether the alarm is enabled.
notification_triggers: Option<Vec<String>>
The alarm states that trigger a notification.
period: Option<i64>
The period, in seconds, over which the statistic is applied.
resource_type: Option<String>
The Lightsail resource type (e.g., Alarm
).
state: Option<String>
The current state of the alarm.
An alarm has the following possible states:
-
ALARM
- The metric is outside of the defined threshold. -
INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. -
OK
- The metric is within the defined threshold.
statistic: Option<String>
The statistic for the metric associated with the alarm.
The following statistics are available:
-
Minimum
- The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application. -
Maximum
- The highest value observed during the specified period. Use this value to determine high volumes of activity for your application. -
Sum
- All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric. -
Average
- The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources. -
SampleCount
- The count, or number, of data points used for the statistical calculation.
support_code: Option<String>
The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.
threshold: Option<f64>
The value against which the specified statistic is compared.
treat_missing_data: Option<String>
Specifies how the alarm handles missing data points.
An alarm can treat missing data in the following ways:
-
breaching
- Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold. -
notBreaching
- Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold. -
ignore
- Ignore the missing data. Maintains the current alarm state. -
missing
- Missing data is treated as missing.
unit: Option<String>
The unit of the metric associated with the alarm.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Alarm
impl<'de> Deserialize<'de> for Alarm
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Alarm
Auto Trait Implementations
impl RefUnwindSafe for Alarm
impl Send for Alarm
impl Sync for Alarm
impl Unpin for Alarm
impl UnwindSafe for Alarm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more