AutoscalingPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Cloud Autoscaler policy.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes | |
---|---|
Name | Description |
cool_down_period_sec |
int
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. This field is a member of oneof _ _cool_down_period_sec .
|
cpu_utilization |
google.cloud.compute_v1.types.AutoscalingPolicyCpuUtilization
Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. This field is a member of oneof _ _cpu_utilization .
|
custom_metric_utilizations |
MutableSequence[google.cloud.compute_v1.types.AutoscalingPolicyCustomMetricUtilization]
Configuration parameters of autoscaling based on a custom metric. |
load_balancing_utilization |
google.cloud.compute_v1.types.AutoscalingPolicyLoadBalancingUtilization
Configuration parameters of autoscaling based on load balancer. This field is a member of oneof _ _load_balancing_utilization .
|
max_num_replicas |
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. This field is a member of oneof _ _max_num_replicas .
|
min_num_replicas |
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. This field is a member of oneof _ _min_num_replicas .
|
mode |
str
Defines operating mode for this policy. Check the Mode enum for the list of possible values. This field is a member of oneof _ _mode .
|
scale_in_control |
google.cloud.compute_v1.types.AutoscalingPolicyScaleInControl
This field is a member of oneof _ _scale_in_control .
|
scaling_schedules |
MutableMapping[str, google.cloud.compute_v1.types.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. |
Classes
Mode
Mode(value)
Defines operating mode for this policy.
Values: UNDEFINED_MODE (0): A value indicating that the enum field is not set. OFF (78159): Do not automatically scale the MIG in or out. The recommended_size field contains the size of MIG that would be set if the actuation mode was enabled. ON (2527): Automatically scale the MIG in and out according to the policy. ONLY_SCALE_OUT (152713670): Automatically create VMs according to the policy, but do not scale the MIG in. ONLY_UP (478095374): Automatically create VMs according to the policy, but do not scale the MIG in.
ScalingSchedulesEntry
ScalingSchedulesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Parameters | |
---|---|
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |