Struct google_api_proto::google::cloud::compute::v1::AutoscalingPolicyCpuUtilization
source · pub struct AutoscalingPolicyCpuUtilization {
pub predictive_method: Option<String>,
pub utilization_target: Option<f64>,
}
Expand description
CPU utilization policy.
Fields§
§predictive_method: Option<String>
Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are: * NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics. * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand. Check the PredictiveMethod enum for the list of possible values.
utilization_target: Option<f64>
The target CPU utilization that the autoscaler maintains. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales in the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales out until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Implementations§
source§impl AutoscalingPolicyCpuUtilization
impl AutoscalingPolicyCpuUtilization
sourcepub fn utilization_target(&self) -> f64
pub fn utilization_target(&self) -> f64
Returns the value of utilization_target
, or the default value if utilization_target
is unset.
sourcepub fn predictive_method(&self) -> &str
pub fn predictive_method(&self) -> &str
Returns the value of predictive_method
, or the default value if predictive_method
is unset.
Trait Implementations§
source§impl Clone for AutoscalingPolicyCpuUtilization
impl Clone for AutoscalingPolicyCpuUtilization
source§fn clone(&self) -> AutoscalingPolicyCpuUtilization
fn clone(&self) -> AutoscalingPolicyCpuUtilization
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Message for AutoscalingPolicyCpuUtilization
impl Message for AutoscalingPolicyCpuUtilization
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for AutoscalingPolicyCpuUtilization
impl PartialEq for AutoscalingPolicyCpuUtilization
source§fn eq(&self, other: &AutoscalingPolicyCpuUtilization) -> bool
fn eq(&self, other: &AutoscalingPolicyCpuUtilization) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AutoscalingPolicyCpuUtilization
Auto Trait Implementations§
impl Freeze for AutoscalingPolicyCpuUtilization
impl RefUnwindSafe for AutoscalingPolicyCpuUtilization
impl Send for AutoscalingPolicyCpuUtilization
impl Sync for AutoscalingPolicyCpuUtilization
impl Unpin for AutoscalingPolicyCpuUtilization
impl UnwindSafe for AutoscalingPolicyCpuUtilization
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request