#[non_exhaustive]pub struct FixedOrPercent {
pub calculated: Option<i32>,
pub fixed: Option<i32>,
pub percent: Option<i32>,
/* private fields */
}instance-group-managers or region-instance-group-managers only.Expand description
Encapsulates numeric value that can be either absolute or relative.
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.calculated: Option<i32>[Output Only] Absolute value of VM instances calculated based on the specific mode. - If the value is fixed, then the calculated value is equal to the fixed value. - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded.
fixed: Option<i32>Specifies a fixed number of VM instances. This must be a positive integer.
percent: Option<i32>Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Implementations§
Source§impl FixedOrPercent
impl FixedOrPercent
pub fn new() -> Self
Sourcepub fn set_calculated<T>(self, v: T) -> Self
pub fn set_calculated<T>(self, v: T) -> Self
Sets the value of calculated.
Sourcepub fn set_or_clear_calculated<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_calculated<T>(self, v: Option<T>) -> Self
Sets or clears the value of calculated.
Sourcepub fn set_or_clear_fixed<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fixed<T>(self, v: Option<T>) -> Self
Sets or clears the value of fixed.
Sourcepub fn set_percent<T>(self, v: T) -> Self
pub fn set_percent<T>(self, v: T) -> Self
Sets the value of percent.
Trait Implementations§
Source§impl Clone for FixedOrPercent
impl Clone for FixedOrPercent
Source§fn clone(&self) -> FixedOrPercent
fn clone(&self) -> FixedOrPercent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more