#[non_exhaustive]pub struct AutoscalingPolicyScaleInControl {
pub max_scaled_in_replicas: Option<FixedOrPercent>,
pub time_window_sec: Option<i32>,
/* private fields */
}Available on crate features
autoscalers or region-autoscalers only.Expand description
Configuration that allows for slower scale in so that even if Autoscaler recommends an abrupt scale in of a MIG, it will be throttled as specified by the parameters below.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_scaled_in_replicas: Option<FixedOrPercent>Maximum allowed number (or %) of VMs that can be deducted from the peak recommendation during the window autoscaler looks at when computing recommendations. Possibly all these VMs can be deleted at once so user service needs to be prepared to lose that many VMs in one step.
time_window_sec: Option<i32>How far back autoscaling looks when computing recommendations to include directives regarding slower scale in, as described above.
Implementations§
Source§impl AutoscalingPolicyScaleInControl
impl AutoscalingPolicyScaleInControl
pub fn new() -> Self
Sourcepub fn set_max_scaled_in_replicas<T>(self, v: T) -> Selfwhere
T: Into<FixedOrPercent>,
pub fn set_max_scaled_in_replicas<T>(self, v: T) -> Selfwhere
T: Into<FixedOrPercent>,
Sets the value of max_scaled_in_replicas.
§Example
ⓘ
use google_cloud_compute_v1::model::FixedOrPercent;
let x = AutoscalingPolicyScaleInControl::new().set_max_scaled_in_replicas(FixedOrPercent::default()/* use setters */);Sourcepub fn set_or_clear_max_scaled_in_replicas<T>(self, v: Option<T>) -> Selfwhere
T: Into<FixedOrPercent>,
pub fn set_or_clear_max_scaled_in_replicas<T>(self, v: Option<T>) -> Selfwhere
T: Into<FixedOrPercent>,
Sets or clears the value of max_scaled_in_replicas.
§Example
ⓘ
use google_cloud_compute_v1::model::FixedOrPercent;
let x = AutoscalingPolicyScaleInControl::new().set_or_clear_max_scaled_in_replicas(Some(FixedOrPercent::default()/* use setters */));
let x = AutoscalingPolicyScaleInControl::new().set_or_clear_max_scaled_in_replicas(None::<FixedOrPercent>);Sourcepub fn set_time_window_sec<T>(self, v: T) -> Self
pub fn set_time_window_sec<T>(self, v: T) -> Self
Sets the value of time_window_sec.
§Example
ⓘ
let x = AutoscalingPolicyScaleInControl::new().set_time_window_sec(42);Sourcepub fn set_or_clear_time_window_sec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_time_window_sec<T>(self, v: Option<T>) -> Self
Sets or clears the value of time_window_sec.
§Example
ⓘ
let x = AutoscalingPolicyScaleInControl::new().set_or_clear_time_window_sec(Some(42));
let x = AutoscalingPolicyScaleInControl::new().set_or_clear_time_window_sec(None::<i32>);Trait Implementations§
Source§impl Clone for AutoscalingPolicyScaleInControl
impl Clone for AutoscalingPolicyScaleInControl
Source§fn clone(&self) -> AutoscalingPolicyScaleInControl
fn clone(&self) -> AutoscalingPolicyScaleInControl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AutoscalingPolicyScaleInControl
impl Default for AutoscalingPolicyScaleInControl
Source§fn default() -> AutoscalingPolicyScaleInControl
fn default() -> AutoscalingPolicyScaleInControl
Returns the “default value” for a type. Read more
Source§impl PartialEq for AutoscalingPolicyScaleInControl
impl PartialEq for AutoscalingPolicyScaleInControl
Source§fn eq(&self, other: &AutoscalingPolicyScaleInControl) -> bool
fn eq(&self, other: &AutoscalingPolicyScaleInControl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AutoscalingPolicyScaleInControl
Auto Trait Implementations§
impl Freeze for AutoscalingPolicyScaleInControl
impl RefUnwindSafe for AutoscalingPolicyScaleInControl
impl Send for AutoscalingPolicyScaleInControl
impl Sync for AutoscalingPolicyScaleInControl
impl Unpin for AutoscalingPolicyScaleInControl
impl UnwindSafe for AutoscalingPolicyScaleInControl
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
Mutably borrows from an owned value. Read more