#[non_exhaustive]pub struct StepAdjustment {
pub metric_interval_lower_bound: Option<f64>,
pub metric_interval_upper_bound: Option<f64>,
pub scaling_adjustment: i32,
}
Expand description
Represents a step adjustment for a StepScalingPolicyConfiguration. Describes an adjustment based on the difference between the value of the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.
For the following examples, suppose that you have an alarm with a breach threshold of 50:
-
To initiate the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of
0
and an upper bound of10
. -
To initiate the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of
-10
and an upper bound of0
.
There are a few rules for the step adjustments for your step policy:
-
The ranges of your step adjustments can't overlap or have a gap.
-
At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there must be a step adjustment with a null lower bound.
-
At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there must be a step adjustment with a null upper bound.
-
The upper and lower bound can't be null in the same step adjustment.
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_interval_lower_bound: Option<f64>
The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it's exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.
metric_interval_upper_bound: Option<f64>
The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it's inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.
The upper bound must be greater than the lower bound.
scaling_adjustment: i32
The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative value.
Implementations§
source§impl StepAdjustment
impl StepAdjustment
sourcepub fn metric_interval_lower_bound(&self) -> Option<f64>
pub fn metric_interval_lower_bound(&self) -> Option<f64>
The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it's exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.
sourcepub fn metric_interval_upper_bound(&self) -> Option<f64>
pub fn metric_interval_upper_bound(&self) -> Option<f64>
The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it's inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.
The upper bound must be greater than the lower bound.
sourcepub fn scaling_adjustment(&self) -> i32
pub fn scaling_adjustment(&self) -> i32
The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative value.
source§impl StepAdjustment
impl StepAdjustment
sourcepub fn builder() -> StepAdjustmentBuilder
pub fn builder() -> StepAdjustmentBuilder
Creates a new builder-style object to manufacture StepAdjustment
.
Trait Implementations§
source§impl Clone for StepAdjustment
impl Clone for StepAdjustment
source§fn clone(&self) -> StepAdjustment
fn clone(&self) -> StepAdjustment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StepAdjustment
impl Debug for StepAdjustment
source§impl PartialEq for StepAdjustment
impl PartialEq for StepAdjustment
source§fn eq(&self, other: &StepAdjustment) -> bool
fn eq(&self, other: &StepAdjustment) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for StepAdjustment
Auto Trait Implementations§
impl Freeze for StepAdjustment
impl RefUnwindSafe for StepAdjustment
impl Send for StepAdjustment
impl Sync for StepAdjustment
impl Unpin for StepAdjustment
impl UnwindSafe for StepAdjustment
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