Class: Google::Apis::AutoscalerV1beta2::AutoscalingPolicyCpuUtilization

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/autoscaler_v1beta2/classes.rb,
generated/google/apis/autoscaler_v1beta2/representations.rb,
generated/google/apis/autoscaler_v1beta2/representations.rb

Overview

CPU utilization policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicyCpuUtilization

Returns a new instance of AutoscalingPolicyCpuUtilization



184
185
186
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 184

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

Instance Attribute Details

#utilization_targetFloat

The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. Corresponds to the JSON property utilizationTarget

Returns:

  • (Float)


182
183
184
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 182

def utilization_target
  @utilization_target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



189
190
191
# File 'generated/google/apis/autoscaler_v1beta2/classes.rb', line 189

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