Class: Google::Apis::AlloydbV1alpha::AutoScalingConfig

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

Configuration for autoscaling.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoScalingConfig

Returns a new instance of AutoScalingConfig.



59
60
61
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 59

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

Instance Attribute Details

#policyGoogle::Apis::AlloydbV1alpha::Policy

Policy for the autoscaler. Corresponds to the JSON property policy



51
52
53
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 51

def policy
  @policy
end

#schedulesArray<Google::Apis::AlloydbV1alpha::Schedule>

Optional list of schedules for the MIG autoscaler. If not set, no schedules are created. Corresponds to the JSON property schedules



57
58
59
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 57

def schedules
  @schedules
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



64
65
66
67
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 64

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