#[non_exhaustive]pub struct AutoscalingPolicy {
pub node_type_id: String,
pub scale_out_size: i32,
pub cpu_thresholds: Option<Thresholds>,
pub granted_memory_thresholds: Option<Thresholds>,
pub consumed_memory_thresholds: Option<Thresholds>,
pub storage_thresholds: Option<Thresholds>,
/* private fields */
}Expand description
Autoscaling policy describes the behavior of the autoscaling with respect to the resource utilization. The scale-out operation is initiated if the utilization exceeds ANY of the respective thresholds. The scale-in operation is initiated if the utilization is below ALL of the respective thresholds.
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.node_type_id: StringRequired. The canonical identifier of the node type to add or remove.
Corresponds to the NodeType.
scale_out_size: i32Required. Number of nodes to add to a cluster during a scale-out operation. Must be divisible by 2 for stretched clusters. During a scale-in operation only one node (or 2 for stretched clusters) are removed in a single iteration.
cpu_thresholds: Option<Thresholds>Optional. Utilization thresholds pertaining to CPU utilization.
granted_memory_thresholds: Option<Thresholds>Optional. Utilization thresholds pertaining to amount of granted memory.
consumed_memory_thresholds: Option<Thresholds>Optional. Utilization thresholds pertaining to amount of consumed memory.
storage_thresholds: Option<Thresholds>Optional. Utilization thresholds pertaining to amount of consumed storage.
Implementations§
Source§impl AutoscalingPolicy
impl AutoscalingPolicy
pub fn new() -> Self
Sourcepub fn set_node_type_id<T: Into<String>>(self, v: T) -> Self
pub fn set_node_type_id<T: Into<String>>(self, v: T) -> Self
Sets the value of node_type_id.
Sourcepub fn set_scale_out_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_scale_out_size<T: Into<i32>>(self, v: T) -> Self
Sets the value of scale_out_size.
Sourcepub fn set_cpu_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
pub fn set_cpu_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
Sets the value of cpu_thresholds.
Sourcepub fn set_or_clear_cpu_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
pub fn set_or_clear_cpu_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
Sets or clears the value of cpu_thresholds.
Sourcepub fn set_granted_memory_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
pub fn set_granted_memory_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
Sets the value of granted_memory_thresholds.
Sourcepub fn set_or_clear_granted_memory_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
pub fn set_or_clear_granted_memory_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
Sets or clears the value of granted_memory_thresholds.
Sourcepub fn set_consumed_memory_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
pub fn set_consumed_memory_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
Sets the value of consumed_memory_thresholds.
Sourcepub fn set_or_clear_consumed_memory_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
pub fn set_or_clear_consumed_memory_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
Sets or clears the value of consumed_memory_thresholds.
Sourcepub fn set_storage_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
pub fn set_storage_thresholds<T>(self, v: T) -> Selfwhere
T: Into<Thresholds>,
Sets the value of storage_thresholds.
Sourcepub fn set_or_clear_storage_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
pub fn set_or_clear_storage_thresholds<T>(self, v: Option<T>) -> Selfwhere
T: Into<Thresholds>,
Sets or clears the value of storage_thresholds.
Trait Implementations§
Source§impl Clone for AutoscalingPolicy
impl Clone for AutoscalingPolicy
Source§fn clone(&self) -> AutoscalingPolicy
fn clone(&self) -> AutoscalingPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more