Class: Google::Apis::AlloydbV1alpha::Policy

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

Overview

Policy for the autoscaler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Policy

Returns a new instance of Policy.



3063
3064
3065
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3063

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

Instance Attribute Details

#cool_down_period_secFixnum

The period of time in seconds after a new node is created before the autoscaler will incorporate its resource usage (e.g. CPU utilization) into the autoscaling recommendation algorithm. Corresponds to the JSON property coolDownPeriodSec

Returns:

  • (Fixnum)


3044
3045
3046
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3044

def cool_down_period_sec
  @cool_down_period_sec
end

#cpu_utilizationGoogle::Apis::AlloydbV1alpha::CpuUtilization

CPU utilization policy for the autoscaler. Corresponds to the JSON property cpuUtilization



3049
3050
3051
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3049

def cpu_utilization
  @cpu_utilization
end

#enabledBoolean Also known as: enabled?

If true, autoscaling is enabled for the instance. If not set, the default value is false. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


3055
3056
3057
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3055

def enabled
  @enabled
end

#max_node_countFixnum

Maximum number of nodes for the autoscaler. Corresponds to the JSON property maxNodeCount

Returns:

  • (Fixnum)


3061
3062
3063
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3061

def max_node_count
  @max_node_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3068
3069
3070
3071
3072
3073
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3068

def update!(**args)
  @cool_down_period_sec = args[:cool_down_period_sec] if args.key?(:cool_down_period_sec)
  @cpu_utilization = args[:cpu_utilization] if args.key?(:cpu_utilization)
  @enabled = args[:enabled] if args.key?(:enabled)
  @max_node_count = args[:max_node_count] if args.key?(:max_node_count)
end