pub struct AutoscalingPolicy {
pub cool_down_period_sec: Option<i32>,
pub cpu_utilization: Option<AutoscalingPolicyCpuUtilization>,
pub custom_metric_utilizations: Option<Vec<AutoscalingPolicyCustomMetricUtilization>>,
pub load_balancing_utilization: Option<AutoscalingPolicyLoadBalancingUtilization>,
pub max_num_replicas: Option<i32>,
pub min_num_replicas: Option<i32>,
pub mode: Option<String>,
pub scale_in_control: Option<AutoscalingPolicyScaleInControl>,
pub scaling_schedules: Option<HashMap<String, AutoscalingPolicyScalingSchedule>>,
}Expand description
Cloud Autoscaler policy.
This type is not used in any activity, and only used as part of another schema.
Fields§
§cool_down_period_sec: Option<i32>The number of seconds that your application takes to initialize on a VM instance. This is referred to as the initialization period. Specifying an accurate initialization period improves autoscaler decisions. For example, when scaling out, the autoscaler ignores data from VMs that are still initializing because those VMs might not yet represent normal usage of your application. The default initialization period is 60 seconds. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application’s startup process.
cpu_utilization: Option<AutoscalingPolicyCpuUtilization>Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
custom_metric_utilizations: Option<Vec<AutoscalingPolicyCustomMetricUtilization>>Configuration parameters of autoscaling based on a custom metric.
load_balancing_utilization: Option<AutoscalingPolicyLoadBalancingUtilization>Configuration parameters of autoscaling based on load balancer.
max_num_replicas: Option<i32>The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.
min_num_replicas: Option<i32>The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.
mode: Option<String>Defines the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see “Turning off or restricting an autoscaler”
scale_in_control: Option<AutoscalingPolicyScaleInControl>no description provided
scaling_schedules: Option<HashMap<String, AutoscalingPolicyScalingSchedule>>Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.
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 moreSource§impl Debug for AutoscalingPolicy
impl Debug for AutoscalingPolicy
Source§impl Default for AutoscalingPolicy
impl Default for AutoscalingPolicy
Source§fn default() -> AutoscalingPolicy
fn default() -> AutoscalingPolicy
Source§impl<'de> Deserialize<'de> for AutoscalingPolicy
impl<'de> Deserialize<'de> for AutoscalingPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for AutoscalingPolicy
impl Serialize for AutoscalingPolicy
impl Part for AutoscalingPolicy
Auto Trait Implementations§
impl Freeze for AutoscalingPolicy
impl RefUnwindSafe for AutoscalingPolicy
impl Send for AutoscalingPolicy
impl Sync for AutoscalingPolicy
impl Unpin for AutoscalingPolicy
impl UnwindSafe for AutoscalingPolicy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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