Class: Google::Apis::SpannerV1::AutoscalingLimits

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

Overview

The autoscaling limits for the instance. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoscalingLimits

Returns a new instance of AutoscalingLimits.



162
163
164
# File 'lib/google/apis/spanner_v1/classes.rb', line 162

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

Instance Attribute Details

#max_nodesFixnum

Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes. Corresponds to the JSON property maxNodes

Returns:

  • (Fixnum)


141
142
143
# File 'lib/google/apis/spanner_v1/classes.rb', line 141

def max_nodes
  @max_nodes
end

#max_processing_unitsFixnum

Maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units. Corresponds to the JSON property maxProcessingUnits

Returns:

  • (Fixnum)


148
149
150
# File 'lib/google/apis/spanner_v1/classes.rb', line 148

def max_processing_units
  @max_processing_units
end

#min_nodesFixnum

Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1. Corresponds to the JSON property minNodes

Returns:

  • (Fixnum)


154
155
156
# File 'lib/google/apis/spanner_v1/classes.rb', line 154

def min_nodes
  @min_nodes
end

#min_processing_unitsFixnum

Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000. Corresponds to the JSON property minProcessingUnits

Returns:

  • (Fixnum)


160
161
162
# File 'lib/google/apis/spanner_v1/classes.rb', line 160

def min_processing_units
  @min_processing_units
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



167
168
169
170
171
172
# File 'lib/google/apis/spanner_v1/classes.rb', line 167

def update!(**args)
  @max_nodes = args[:max_nodes] if args.key?(:max_nodes)
  @max_processing_units = args[:max_processing_units] if args.key?(:max_processing_units)
  @min_nodes = args[:min_nodes] if args.key?(:min_nodes)
  @min_processing_units = args[:min_processing_units] if args.key?(:min_processing_units)
end