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.



365
366
367
# File 'lib/google/apis/spanner_v1/classes.rb', line 365

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)


344
345
346
# File 'lib/google/apis/spanner_v1/classes.rb', line 344

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)


351
352
353
# File 'lib/google/apis/spanner_v1/classes.rb', line 351

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)


357
358
359
# File 'lib/google/apis/spanner_v1/classes.rb', line 357

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)


363
364
365
# File 'lib/google/apis/spanner_v1/classes.rb', line 363

def min_processing_units
  @min_processing_units
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



370
371
372
373
374
375
# File 'lib/google/apis/spanner_v1/classes.rb', line 370

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