Struct aws_sdk_iotsitewise::types::TumblingWindow
source · #[non_exhaustive]pub struct TumblingWindow {
pub interval: String,
pub offset: Option<String>,
}Expand description
Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, and contiguous time window. You can use this window in metrics to aggregate data from properties and other assets.
You can use m, h, d, and w when you specify an interval or offset. Note that m represents minutes, h represents hours, d represents days, and w represents weeks. You can also use s to represent seconds in offset.
The interval and offset parameters support the ISO 8601 format. For example, PT5S represents 5 seconds, PT5M represents 5 minutes, and PT5H represents 5 hours.
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.interval: StringThe time interval for the tumbling window. The interval time must be between 1 minute and 1 week.
IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of each hour, and so on.
When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.
offset: Option<String>The offset for the tumbling window. The offset parameter accepts the following:
-
The offset time.
For example, if you specify
18hforoffsetand1dforinterval, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The ISO 8601 format.
For example, if you specify
PT18Hforoffsetand1dforinterval, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The 24-hour clock.
For example, if you specify
00:03:00foroffset,5mforinterval, and you create the metric at 2 PM (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result at 2:08 PM (UTC). -
The offset time zone.
For example, if you specify
2021-07-23T18:00-08foroffsetand1dforinterval, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day when you create the metric.
-
If you create the metric after 6 PM (PST), you get the first aggregation result at 6 PM (PST) the next day.
-
Implementations§
source§impl TumblingWindow
impl TumblingWindow
sourcepub fn interval(&self) -> &str
pub fn interval(&self) -> &str
The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.
IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of each hour, and so on.
When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.
sourcepub fn offset(&self) -> Option<&str>
pub fn offset(&self) -> Option<&str>
The offset for the tumbling window. The offset parameter accepts the following:
-
The offset time.
For example, if you specify
18hforoffsetand1dforinterval, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The ISO 8601 format.
For example, if you specify
PT18Hforoffsetand1dforinterval, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The 24-hour clock.
For example, if you specify
00:03:00foroffset,5mforinterval, and you create the metric at 2 PM (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result at 2:08 PM (UTC). -
The offset time zone.
For example, if you specify
2021-07-23T18:00-08foroffsetand1dforinterval, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day when you create the metric.
-
If you create the metric after 6 PM (PST), you get the first aggregation result at 6 PM (PST) the next day.
-
source§impl TumblingWindow
impl TumblingWindow
sourcepub fn builder() -> TumblingWindowBuilder
pub fn builder() -> TumblingWindowBuilder
Creates a new builder-style object to manufacture TumblingWindow.
Trait Implementations§
source§impl Clone for TumblingWindow
impl Clone for TumblingWindow
source§fn clone(&self) -> TumblingWindow
fn clone(&self) -> TumblingWindow
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TumblingWindow
impl Debug for TumblingWindow
source§impl PartialEq for TumblingWindow
impl PartialEq for TumblingWindow
source§fn eq(&self, other: &TumblingWindow) -> bool
fn eq(&self, other: &TumblingWindow) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for TumblingWindow
Auto Trait Implementations§
impl Freeze for TumblingWindow
impl RefUnwindSafe for TumblingWindow
impl Send for TumblingWindow
impl Sync for TumblingWindow
impl Unpin for TumblingWindow
impl UnwindSafe for TumblingWindow
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> 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 more