Class: Google::Apis::AppengineV1beta5::CpuUtilization

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

Overview

Target scaling by CPU usage.

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) ⇒ CpuUtilization

Returns a new instance of CpuUtilization



334
335
336
# File 'generated/google/apis/appengine_v1beta5/classes.rb', line 334

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

Instance Attribute Details

#aggregation_window_lengthString

Period of time over which CPU utilization is calculated. Corresponds to the JSON property aggregationWindowLength

Returns:

  • (String)


327
328
329
# File 'generated/google/apis/appengine_v1beta5/classes.rb', line 327

def aggregation_window_length
  @aggregation_window_length
end

#target_utilizationFloat

Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1. Corresponds to the JSON property targetUtilization

Returns:

  • (Float)


332
333
334
# File 'generated/google/apis/appengine_v1beta5/classes.rb', line 332

def target_utilization
  @target_utilization
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



339
340
341
342
# File 'generated/google/apis/appengine_v1beta5/classes.rb', line 339

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