Struct aws_sdk_cloudwatch::model::MetricStat
source · [−]#[non_exhaustive]pub struct MetricStat {
pub metric: Option<Metric>,
pub period: Option<i32>,
pub stat: Option<String>,
pub unit: Option<StandardUnit>,
}Expand description
This structure defines the metric to be returned, along with the statistics, period, and units.
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.metric: Option<Metric>The metric to return, including the metric name, namespace, and dimensions.
period: Option<i32>The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a PutMetricData call that includes a StorageResolution of 1 second.
If the StartTime parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned:
-
Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds (1 minute).
-
Start time between 15 and 63 days ago - Use a multiple of 300 seconds (5 minutes).
-
Start time greater than 63 days ago - Use a multiple of 3600 seconds (1 hour).
stat: Option<String>The statistic to return. It can include any CloudWatch statistic or extended statistic.
unit: Option<StandardUnit>When you are using a Put operation, this defines what unit you want to use when storing the metric.
In a Get operation, if you omit Unit then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.
Implementations
sourceimpl MetricStat
impl MetricStat
sourcepub fn metric(&self) -> Option<&Metric>
pub fn metric(&self) -> Option<&Metric>
The metric to return, including the metric name, namespace, and dimensions.
sourcepub fn period(&self) -> Option<i32>
pub fn period(&self) -> Option<i32>
The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a PutMetricData call that includes a StorageResolution of 1 second.
If the StartTime parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned:
-
Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds (1 minute).
-
Start time between 15 and 63 days ago - Use a multiple of 300 seconds (5 minutes).
-
Start time greater than 63 days ago - Use a multiple of 3600 seconds (1 hour).
sourcepub fn stat(&self) -> Option<&str>
pub fn stat(&self) -> Option<&str>
The statistic to return. It can include any CloudWatch statistic or extended statistic.
sourcepub fn unit(&self) -> Option<&StandardUnit>
pub fn unit(&self) -> Option<&StandardUnit>
When you are using a Put operation, this defines what unit you want to use when storing the metric.
In a Get operation, if you omit Unit then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.
sourceimpl MetricStat
impl MetricStat
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture MetricStat
Trait Implementations
sourceimpl Clone for MetricStat
impl Clone for MetricStat
sourcefn clone(&self) -> MetricStat
fn clone(&self) -> MetricStat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for MetricStat
impl Debug for MetricStat
sourceimpl PartialEq<MetricStat> for MetricStat
impl PartialEq<MetricStat> for MetricStat
sourcefn eq(&self, other: &MetricStat) -> bool
fn eq(&self, other: &MetricStat) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MetricStat) -> bool
fn ne(&self, other: &MetricStat) -> bool
This method tests for !=.
impl StructuralPartialEq for MetricStat
Auto Trait Implementations
impl RefUnwindSafe for MetricStat
impl Send for MetricStat
impl Sync for MetricStat
impl Unpin for MetricStat
impl UnwindSafe for MetricStat
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> 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