Class: Google::Apis::AlloydbV1alpha::Policy
- Inherits:
-
Object
- Object
- Google::Apis::AlloydbV1alpha::Policy
- 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
-
#cool_down_period_sec ⇒ Fixnum
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.
-
#cpu_utilization ⇒ Google::Apis::AlloydbV1alpha::CpuUtilization
CPU utilization policy for the autoscaler.
-
#enabled ⇒ Boolean
(also: #enabled?)
If true, autoscaling is enabled for the instance.
-
#max_node_count ⇒ Fixnum
Maximum number of nodes for the autoscaler.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Policy
constructor
A new instance of Policy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Policy
Returns a new instance of Policy.
3117 3118 3119 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3117 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cool_down_period_sec ⇒ Fixnum
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
3098 3099 3100 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3098 def cool_down_period_sec @cool_down_period_sec end |
#cpu_utilization ⇒ Google::Apis::AlloydbV1alpha::CpuUtilization
CPU utilization policy for the autoscaler.
Corresponds to the JSON property cpuUtilization
3103 3104 3105 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3103 def cpu_utilization @cpu_utilization end |
#enabled ⇒ Boolean 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
3109 3110 3111 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3109 def enabled @enabled end |
#max_node_count ⇒ Fixnum
Maximum number of nodes for the autoscaler.
Corresponds to the JSON property maxNodeCount
3115 3116 3117 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3115 def max_node_count @max_node_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3122 3123 3124 3125 3126 3127 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3122 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 |