Class: Google::Apis::ComputeAlpha::AutoscalingPolicyScaleInControl

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicyScaleInControl

Returns a new instance of AutoscalingPolicyScaleInControl.



2561
2562
2563
# File 'generated/google/apis/compute_alpha/classes.rb', line 2561

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

Instance Attribute Details

#max_scaled_in_replicasGoogle::Apis::ComputeAlpha::FixedOrPercent

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



2553
2554
2555
# File 'generated/google/apis/compute_alpha/classes.rb', line 2553

def max_scaled_in_replicas
  @max_scaled_in_replicas
end

#time_window_secFixnum

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

Returns:

  • (Fixnum)


2559
2560
2561
# File 'generated/google/apis/compute_alpha/classes.rb', line 2559

def time_window_sec
  @time_window_sec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2566
2567
2568
2569
# File 'generated/google/apis/compute_alpha/classes.rb', line 2566

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