Class: Google::Apis::SqladminV1::ReadPoolAutoScaleConfig

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

Overview

The read pool auto-scale configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReadPoolAutoScaleConfig

Returns a new instance of ReadPoolAutoScaleConfig.



4744
4745
4746
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4744

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

Instance Attribute Details

#disable_scale_inBoolean Also known as: disable_scale_in?

Indicates whether read pool auto scaling supports scale in operations ( removing nodes). Corresponds to the JSON property disableScaleIn

Returns:

  • (Boolean)


4710
4711
4712
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4710

def disable_scale_in
  @disable_scale_in
end

#enabledBoolean Also known as: enabled?

Indicates whether read pool auto scaling is enabled. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


4716
4717
4718
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4716

def enabled
  @enabled
end

#max_node_countFixnum

Maximum number of read pool nodes to be maintained. Corresponds to the JSON property maxNodeCount

Returns:

  • (Fixnum)


4722
4723
4724
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4722

def max_node_count
  @max_node_count
end

#min_node_countFixnum

Minimum number of read pool nodes to be maintained. Corresponds to the JSON property minNodeCount

Returns:

  • (Fixnum)


4727
4728
4729
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4727

def min_node_count
  @min_node_count
end

#scale_in_cooldown_secondsFixnum

The cooldown period for scale-in operations. Corresponds to the JSON property scaleInCooldownSeconds

Returns:

  • (Fixnum)


4732
4733
4734
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4732

def scale_in_cooldown_seconds
  @scale_in_cooldown_seconds
end

#scale_out_cooldown_secondsFixnum

The cooldown period for scale-out operations. Corresponds to the JSON property scaleOutCooldownSeconds

Returns:

  • (Fixnum)


4737
4738
4739
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4737

def scale_out_cooldown_seconds
  @scale_out_cooldown_seconds
end

#target_metricsArray<Google::Apis::SqladminV1::TargetMetric>

Optional. Target metrics for read pool auto scaling. Corresponds to the JSON property targetMetrics



4742
4743
4744
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4742

def target_metrics
  @target_metrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4749
4750
4751
4752
4753
4754
4755
4756
4757
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 4749

def update!(**args)
  @disable_scale_in = args[:disable_scale_in] if args.key?(:disable_scale_in)
  @enabled = args[:enabled] if args.key?(:enabled)
  @max_node_count = args[:max_node_count] if args.key?(:max_node_count)
  @min_node_count = args[:min_node_count] if args.key?(:min_node_count)
  @scale_in_cooldown_seconds = args[:scale_in_cooldown_seconds] if args.key?(:scale_in_cooldown_seconds)
  @scale_out_cooldown_seconds = args[:scale_out_cooldown_seconds] if args.key?(:scale_out_cooldown_seconds)
  @target_metrics = args[:target_metrics] if args.key?(:target_metrics)
end