pub struct AppSpecWorkersItemAutoscaling {
pub max_instance_count: Option<NonZeroU32>,
pub metrics: Option<AppSpecWorkersItemAutoscalingMetrics>,
pub min_instance_count: Option<NonZeroU32>,
}Expand description
Configuration for automatically scaling this component based on metrics.
JSON schema
{
"description": "Configuration for automatically scaling this component based on metrics.",
"type": "object",
"properties": {
"max_instance_count": {
"description": "The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances.",
"examples": [
3
],
"type": "integer",
"format": "uint32",
"maximum": 250.0,
"minimum": 1.0
},
"metrics": {
"description": "The metrics that the component is scaled on.",
"type": "object",
"properties": {
"cpu": {
"description": "Settings for scaling the component based on CPU utilization.",
"type": "object",
"properties": {
"percent": {
"description": "The average target CPU utilization for the component.",
"default": 80,
"examples": [
75
],
"type": "integer",
"format": "uint32",
"maximum": 100.0,
"minimum": 1.0
}
}
}
}
},
"min_instance_count": {
"description": "The minimum amount of instances for this component.",
"examples": [
2
],
"type": "integer",
"format": "uint32",
"minimum": 1.0
}
}
}Fields§
§max_instance_count: Option<NonZeroU32>The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances.
metrics: Option<AppSpecWorkersItemAutoscalingMetrics>§min_instance_count: Option<NonZeroU32>The minimum amount of instances for this component.
Trait Implementations§
Source§impl Clone for AppSpecWorkersItemAutoscaling
impl Clone for AppSpecWorkersItemAutoscaling
Source§fn clone(&self) -> AppSpecWorkersItemAutoscaling
fn clone(&self) -> AppSpecWorkersItemAutoscaling
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for AppSpecWorkersItemAutoscaling
impl<'de> Deserialize<'de> for AppSpecWorkersItemAutoscaling
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&AppSpecWorkersItemAutoscaling> for AppSpecWorkersItemAutoscaling
impl From<&AppSpecWorkersItemAutoscaling> for AppSpecWorkersItemAutoscaling
Source§fn from(value: &AppSpecWorkersItemAutoscaling) -> Self
fn from(value: &AppSpecWorkersItemAutoscaling) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AppSpecWorkersItemAutoscaling
impl RefUnwindSafe for AppSpecWorkersItemAutoscaling
impl Send for AppSpecWorkersItemAutoscaling
impl Sync for AppSpecWorkersItemAutoscaling
impl Unpin for AppSpecWorkersItemAutoscaling
impl UnsafeUnpin for AppSpecWorkersItemAutoscaling
impl UnwindSafe for AppSpecWorkersItemAutoscaling
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
Mutably borrows from an owned value. Read more