Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::AutoscalingPolicy (v2.6.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 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. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's startup process.

#cool_down_period_sec=

def cool_down_period_sec=(value) -> ::Integer
Parameter
  • value (::Integer) — 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. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's startup process.
Returns
  • (::Integer) — 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. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's 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 the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see "Turning off or restricting an autoscaler" Check the Mode enum for the list of possible values.

#mode=

def mode=(value) -> ::String
Parameter
  • value (::String) — Defines the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see "Turning off or restricting an autoscaler" Check the Mode enum for the list of possible values.
Returns
  • (::String) — Defines the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see "Turning off or restricting an autoscaler" 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.