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.



324
325
326
# File 'lib/google/apis/spanner_v1/classes.rb', line 324

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)


303
304
305
# File 'lib/google/apis/spanner_v1/classes.rb', line 303

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)


310
311
312
# File 'lib/google/apis/spanner_v1/classes.rb', line 310

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)


316
317
318
# File 'lib/google/apis/spanner_v1/classes.rb', line 316

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)


322
323
324
# File 'lib/google/apis/spanner_v1/classes.rb', line 322

def min_processing_units
  @min_processing_units
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



329
330
331
332
333
334
# File 'lib/google/apis/spanner_v1/classes.rb', line 329

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