#[non_exhaustive]pub struct AutoscalingConfig {
pub autoscaling_limits: Option<AutoscalingLimits>,
pub autoscaling_targets: Option<AutoscalingTargets>,
pub asymmetric_autoscaling_options: Vec<AsymmetricAutoscalingOption>,
/* private fields */
}Expand description
Autoscaling configuration for an instance.
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.autoscaling_limits: Option<AutoscalingLimits>Required. Autoscaling limits for an instance.
autoscaling_targets: Option<AutoscalingTargets>Required. The autoscaling targets for an instance.
asymmetric_autoscaling_options: Vec<AsymmetricAutoscalingOption>Optional. Optional asymmetric autoscaling options. Replicas matching the replica selection criteria will be autoscaled independently from other replicas. The autoscaler will scale the replicas based on the utilization of replicas identified by the replica selection. Replica selections should not overlap with each other.
Other replicas (those do not match any replica selection) will be autoscaled together and will have the same compute capacity allocated to them.
Implementations§
Source§impl AutoscalingConfig
impl AutoscalingConfig
Sourcepub fn set_autoscaling_limits<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingLimits>,
pub fn set_autoscaling_limits<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingLimits>,
Sets the value of autoscaling_limits.
§Example
use google_cloud_spanner_admin_instance_v1::model::autoscaling_config::AutoscalingLimits;
let x = AutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);Sourcepub fn set_or_clear_autoscaling_limits<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingLimits>,
pub fn set_or_clear_autoscaling_limits<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingLimits>,
Sets or clears the value of autoscaling_limits.
§Example
use google_cloud_spanner_admin_instance_v1::model::autoscaling_config::AutoscalingLimits;
let x = AutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
let x = AutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);Sourcepub fn set_autoscaling_targets<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingTargets>,
pub fn set_autoscaling_targets<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingTargets>,
Sets the value of autoscaling_targets.
§Example
use google_cloud_spanner_admin_instance_v1::model::autoscaling_config::AutoscalingTargets;
let x = AutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);Sourcepub fn set_or_clear_autoscaling_targets<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingTargets>,
pub fn set_or_clear_autoscaling_targets<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingTargets>,
Sets or clears the value of autoscaling_targets.
§Example
use google_cloud_spanner_admin_instance_v1::model::autoscaling_config::AutoscalingTargets;
let x = AutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
let x = AutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);Sourcepub fn set_asymmetric_autoscaling_options<T, V>(self, v: T) -> Self
pub fn set_asymmetric_autoscaling_options<T, V>(self, v: T) -> Self
Sets the value of asymmetric_autoscaling_options.
§Example
use google_cloud_spanner_admin_instance_v1::model::autoscaling_config::AsymmetricAutoscalingOption;
let x = AutoscalingConfig::new()
.set_asymmetric_autoscaling_options([
AsymmetricAutoscalingOption::default()/* use setters */,
AsymmetricAutoscalingOption::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for AutoscalingConfig
impl Clone for AutoscalingConfig
Source§fn clone(&self) -> AutoscalingConfig
fn clone(&self) -> AutoscalingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AutoscalingConfig
impl Debug for AutoscalingConfig
Source§impl Default for AutoscalingConfig
impl Default for AutoscalingConfig
Source§fn default() -> AutoscalingConfig
fn default() -> AutoscalingConfig
Source§impl Message for AutoscalingConfig
impl Message for AutoscalingConfig
Source§impl PartialEq for AutoscalingConfig
impl PartialEq for AutoscalingConfig
impl StructuralPartialEq for AutoscalingConfig
Auto Trait Implementations§
impl Freeze for AutoscalingConfig
impl RefUnwindSafe for AutoscalingConfig
impl Send for AutoscalingConfig
impl Sync for AutoscalingConfig
impl Unpin for AutoscalingConfig
impl UnsafeUnpin for AutoscalingConfig
impl UnwindSafe for AutoscalingConfig
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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