Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::AutoscalingPolicy (v1.9.0)

Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::AutoscalingPolicy.

Cloud Autoscaler policy.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#cool_down_period_sec

def cool_down_period_sec() -> ::Integer
Returns
  • (::Integer) — 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.

#cool_down_period_sec=

def cool_down_period_sec=(value) -> ::Integer
Parameter
  • value (::Integer) — 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.
Returns
  • (::Integer) — 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.

#cpu_utilization

def cpu_utilization() -> ::Google::Cloud::Compute::V1::AutoscalingPolicyCpuUtilization
Returns

#cpu_utilization=

def cpu_utilization=(value) -> ::Google::Cloud::Compute::V1::AutoscalingPolicyCpuUtilization
Parameter
Returns

#custom_metric_utilizations

def custom_metric_utilizations() -> ::Array<::Google::Cloud::Compute::V1::AutoscalingPolicyCustomMetricUtilization>
Returns

#custom_metric_utilizations=

def custom_metric_utilizations=(value) -> ::Array<::Google::Cloud::Compute::V1::AutoscalingPolicyCustomMetricUtilization>
Parameter
Returns

#load_balancing_utilization

def load_balancing_utilization() -> ::Google::Cloud::Compute::V1::AutoscalingPolicyLoadBalancingUtilization
Returns

#load_balancing_utilization=

def load_balancing_utilization=(value) -> ::Google::Cloud::Compute::V1::AutoscalingPolicyLoadBalancingUtilization
Parameter
Returns

#max_num_replicas

def max_num_replicas() -> ::Integer
Returns
  • (::Integer) — 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.

#max_num_replicas=

def max_num_replicas=(value) -> ::Integer
Parameter
  • value (::Integer) — 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.
Returns
  • (::Integer) — 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.

#min_num_replicas

def min_num_replicas() -> ::Integer
Returns
  • (::Integer) — 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.

#min_num_replicas=

def min_num_replicas=(value) -> ::Integer
Parameter
  • value (::Integer) — 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.
Returns
  • (::Integer) — 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.

#mode

def mode() -> ::String
Returns
  • (::String) — Defines operating mode for this policy. Check the Mode enum for the list of possible values.

#mode=

def mode=(value) -> ::String
Parameter
  • value (::String) — Defines operating mode for this policy. Check the Mode enum for the list of possible values.
Returns
  • (::String) — Defines operating mode for this policy. Check the Mode enum for the list of possible values.

#scale_in_control

def scale_in_control() -> ::Google::Cloud::Compute::V1::AutoscalingPolicyScaleInControl

#scale_in_control=

def scale_in_control=(value) -> ::Google::Cloud::Compute::V1::AutoscalingPolicyScaleInControl

#scaling_schedules

def scaling_schedules() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule}
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::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.

#scaling_schedules=

def scaling_schedules=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::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.
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::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.