Class: Google::Apis::ComputeAlpha::AutoscalingPolicyScaleDownControl

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

Configuration that allows for slower scale in so that even if Autoscaler recommends an abrupt scale in of a MIG, it will be throttled as specified by the parameters below.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicyScaleDownControl

Returns a new instance of AutoscalingPolicyScaleDownControl.



2633
2634
2635
# File 'lib/google/apis/compute_alpha/classes.rb', line 2633

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_scaled_down_replicasGoogle::Apis::ComputeAlpha::FixedOrPercent

Encapsulates numeric value that can be either absolute or relative. Corresponds to the JSON property maxScaledDownReplicas



2625
2626
2627
# File 'lib/google/apis/compute_alpha/classes.rb', line 2625

def max_scaled_down_replicas
  @max_scaled_down_replicas
end

#time_window_secFixnum

How far back autoscaling looks when computing recommendations to include directives regarding slower scale in, as described above. Corresponds to the JSON property timeWindowSec

Returns:

  • (Fixnum)


2631
2632
2633
# File 'lib/google/apis/compute_alpha/classes.rb', line 2631

def time_window_sec
  @time_window_sec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2638
2639
2640
2641
# File 'lib/google/apis/compute_alpha/classes.rb', line 2638

def update!(**args)
  @max_scaled_down_replicas = args[:max_scaled_down_replicas] if args.key?(:max_scaled_down_replicas)
  @time_window_sec = args[:time_window_sec] if args.key?(:time_window_sec)
end