AutoscalingPolicy class final
Cloud Autoscaler policy.
Constructors
-
AutoscalingPolicy({int? coolDownPeriodSec, AutoscalingPolicyCpuUtilization? cpuUtilization, List<
AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations = const [], AutoscalingPolicyLoadBalancingUtilization? loadBalancingUtilization, int? maxNumReplicas, int? minNumReplicas, String? mode, AutoscalingPolicyScaleInControl? scaleInControl, Map<String, AutoscalingPolicyScalingSchedule> scalingSchedules = const {}, int? stabilizationPeriodSec}) - AutoscalingPolicy.fromJson(Object? j)
-
factory
Properties
- coolDownPeriodSec → int?
-
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.
final
- cpuUtilization → AutoscalingPolicyCpuUtilization?
-
Defines the CPU utilization policy that allows the autoscaler to scale
based on the average CPU utilization of a managed instance group.
final
-
customMetricUtilizations
→ List<
AutoscalingPolicyCustomMetricUtilization> -
Configuration parameters of autoscaling based on a custom metric.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadBalancingUtilization → AutoscalingPolicyLoadBalancingUtilization?
-
Configuration parameters of autoscaling based on load balancer.
final
- maxNumReplicas → int?
-
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.
final
- minNumReplicas → int?
-
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.
final
- mode → String?
-
Defines the operating mode for this policy.
The following modes are available:
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleInControl → AutoscalingPolicyScaleInControl?
-
final
-
scalingSchedules
→ Map<
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.
final
- stabilizationPeriodSec → int?
-
The number of seconds that autoscaler waits for load stabilization before
making scale-in decisions. This is referred to as the
stabilization period.
This might appear as a delay in scaling in but it is an important mechanism
for your application to not have fluctuating size due to short term load
fluctuations.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String