Class AutoscalingPolicy (2.1.0)

public sealed class AutoscalingPolicy : IMessage<AutoscalingPolicy>, IEquatable<AutoscalingPolicy>, IDeepCloneable<AutoscalingPolicy>, IBufferMessage, IMessage

Cloud Autoscaler policy.

Inheritance

Object > AutoscalingPolicy

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

AutoscalingPolicy()

public AutoscalingPolicy()

AutoscalingPolicy(AutoscalingPolicy)

public AutoscalingPolicy(AutoscalingPolicy other)
Parameter
NameDescription
otherAutoscalingPolicy

Properties

CoolDownPeriodSec

public int CoolDownPeriodSec { get; set; }

The number of seconds that the autoscaler waits before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.

Property Value
TypeDescription
Int32

CpuUtilization

public AutoscalingPolicyCpuUtilization CpuUtilization { get; set; }

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

Property Value
TypeDescription
AutoscalingPolicyCpuUtilization

CustomMetricUtilizations

public RepeatedField<AutoscalingPolicyCustomMetricUtilization> CustomMetricUtilizations { get; }

Configuration parameters of autoscaling based on a custom metric.

Property Value
TypeDescription
RepeatedField<AutoscalingPolicyCustomMetricUtilization>

HasCoolDownPeriodSec

public bool HasCoolDownPeriodSec { get; }

Gets whether the "cool_down_period_sec" field is set

Property Value
TypeDescription
Boolean

HasMaxNumReplicas

public bool HasMaxNumReplicas { get; }

Gets whether the "max_num_replicas" field is set

Property Value
TypeDescription
Boolean

HasMinNumReplicas

public bool HasMinNumReplicas { get; }

Gets whether the "min_num_replicas" field is set

Property Value
TypeDescription
Boolean

HasMode

public bool HasMode { get; }

Gets whether the "mode" field is set

Property Value
TypeDescription
Boolean

LoadBalancingUtilization

public AutoscalingPolicyLoadBalancingUtilization LoadBalancingUtilization { get; set; }

Configuration parameters of autoscaling based on load balancer.

Property Value
TypeDescription
AutoscalingPolicyLoadBalancingUtilization

MaxNumReplicas

public int MaxNumReplicas { get; set; }

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.

Property Value
TypeDescription
Int32

MinNumReplicas

public int MinNumReplicas { get; set; }

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.

Property Value
TypeDescription
Int32

Mode

public string Mode { get; set; }

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

Property Value
TypeDescription
String

ScaleInControl

public AutoscalingPolicyScaleInControl ScaleInControl { get; set; }
Property Value
TypeDescription
AutoscalingPolicyScaleInControl

ScalingSchedules

public MapField<string, AutoscalingPolicyScalingSchedule> ScalingSchedules { get; }

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.

Property Value
TypeDescription
MapField<String, AutoscalingPolicyScalingSchedule>