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.



245
246
247
# File 'lib/google/apis/spanner_v1/classes.rb', line 245

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



229
230
231
# File 'lib/google/apis/spanner_v1/classes.rb', line 229

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



238
239
240
# File 'lib/google/apis/spanner_v1/classes.rb', line 238

def autoscaling_limits
  @autoscaling_limits
end

#autoscaling_targetsGoogle::Apis::SpannerV1::AutoscalingTargets

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



243
244
245
# File 'lib/google/apis/spanner_v1/classes.rb', line 243

def autoscaling_targets
  @autoscaling_targets
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



250
251
252
253
254
# File 'lib/google/apis/spanner_v1/classes.rb', line 250

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