Class: Google::Apis::SpannerV1::AutoscalingConfig

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

Autoscaling configuration for an instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoscalingConfig

Returns a new instance of AutoscalingConfig.



210
211
212
# File 'lib/google/apis/spanner_v1/classes.rb', line 210

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

Instance Attribute Details

#asymmetric_autoscaling_optionsArray<Google::Apis::SpannerV1::AsymmetricAutoscalingOption>

Optional. Optional asymmetric autoscaling options. Replicas matching the replica selection criteria will be autoscaled independently from other replicas. The autoscaler will scale the replicas based on the utilization of replicas identified by the replica selection. Replica selections should not overlap with each other. Other replicas (those do not match any replica selection) will be autoscaled together and will have the same compute capacity allocated to them. Corresponds to the JSON property asymmetricAutoscalingOptions



194
195
196
# File 'lib/google/apis/spanner_v1/classes.rb', line 194

def asymmetric_autoscaling_options
  @asymmetric_autoscaling_options
end

#autoscaling_limitsGoogle::Apis::SpannerV1::AutoscalingLimits

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. Corresponds to the JSON property autoscalingLimits



203
204
205
# File 'lib/google/apis/spanner_v1/classes.rb', line 203

def autoscaling_limits
  @autoscaling_limits
end

#autoscaling_targetsGoogle::Apis::SpannerV1::AutoscalingTargets

The autoscaling targets for an instance. Corresponds to the JSON property autoscalingTargets



208
209
210
# File 'lib/google/apis/spanner_v1/classes.rb', line 208

def autoscaling_targets
  @autoscaling_targets
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



215
216
217
218
219
# File 'lib/google/apis/spanner_v1/classes.rb', line 215

def update!(**args)
  @asymmetric_autoscaling_options = args[:asymmetric_autoscaling_options] if args.key?(:asymmetric_autoscaling_options)
  @autoscaling_limits = args[:autoscaling_limits] if args.key?(:autoscaling_limits)
  @autoscaling_targets = args[:autoscaling_targets] if args.key?(:autoscaling_targets)
end