Class: Google::Apis::SpannerV1::AutoscalingTargets

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 targets for an instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoscalingTargets

Returns a new instance of AutoscalingTargets.



409
410
411
# File 'lib/google/apis/spanner_v1/classes.rb', line 409

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

Instance Attribute Details

#high_priority_cpu_utilization_percentFixnum

Optional. The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [ 10, 90] inclusive. If not specified or set to 0, the autoscaler skips scaling based on high priority CPU utilization. Corresponds to the JSON property highPriorityCpuUtilizationPercent

Returns:

  • (Fixnum)


389
390
391
# File 'lib/google/apis/spanner_v1/classes.rb', line 389

def high_priority_cpu_utilization_percent
  @high_priority_cpu_utilization_percent
end

#storage_utilization_percentFixnum

Required. The target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 99] inclusive. Corresponds to the JSON property storageUtilizationPercent

Returns:

  • (Fixnum)


396
397
398
# File 'lib/google/apis/spanner_v1/classes.rb', line 396

def storage_utilization_percent
  @storage_utilization_percent
end

#total_cpu_utilization_percentFixnum

Optional. The target total CPU utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler skips scaling based on total CPU utilization. If both high_priority_cpu_utilization_percent and total_cpu_utilization_percent are specified, the autoscaler provisions the larger of the two required compute capacities to satisfy both targets. Corresponds to the JSON property totalCpuUtilizationPercent

Returns:

  • (Fixnum)


407
408
409
# File 'lib/google/apis/spanner_v1/classes.rb', line 407

def total_cpu_utilization_percent
  @total_cpu_utilization_percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



414
415
416
417
418
# File 'lib/google/apis/spanner_v1/classes.rb', line 414

def update!(**args)
  @high_priority_cpu_utilization_percent = args[:high_priority_cpu_utilization_percent] if args.key?(:high_priority_cpu_utilization_percent)
  @storage_utilization_percent = args[:storage_utilization_percent] if args.key?(:storage_utilization_percent)
  @total_cpu_utilization_percent = args[:total_cpu_utilization_percent] if args.key?(:total_cpu_utilization_percent)
end