Class: Google::Apis::VmwareengineV1::AutoscalingPolicy

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

Overview

Autoscaling policy describes the behavior of the autoscaling with respect to the resource utilization. The scale-out operation is initiated if the utilization exceeds ANY of the respective thresholds. The scale-in operation is initiated if the utilization is below ALL of the respective thresholds.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicy

Returns a new instance of AutoscalingPolicy.



257
258
259
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 257

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

Instance Attribute Details

#consumed_memory_thresholdsGoogle::Apis::VmwareengineV1::Thresholds

Thresholds define the utilization of resources triggering scale-out and scale- in operations. Corresponds to the JSON property consumedMemoryThresholds



224
225
226
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 224

def consumed_memory_thresholds
  @consumed_memory_thresholds
end

#cpu_thresholdsGoogle::Apis::VmwareengineV1::Thresholds

Thresholds define the utilization of resources triggering scale-out and scale- in operations. Corresponds to the JSON property cpuThresholds



230
231
232
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 230

def cpu_thresholds
  @cpu_thresholds
end

#granted_memory_thresholdsGoogle::Apis::VmwareengineV1::Thresholds

Thresholds define the utilization of resources triggering scale-out and scale- in operations. Corresponds to the JSON property grantedMemoryThresholds



236
237
238
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 236

def granted_memory_thresholds
  @granted_memory_thresholds
end

#node_type_idString

Required. The canonical identifier of the node type to add or remove. Corresponds to the NodeType. Corresponds to the JSON property nodeTypeId

Returns:

  • (String)


242
243
244
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 242

def node_type_id
  @node_type_id
end

#scale_out_sizeFixnum

Required. Number of nodes to add to a cluster during a scale-out operation. Must be divisible by 2 for stretched clusters. During a scale-in operation only one node (or 2 for stretched clusters) are removed in a single iteration. Corresponds to the JSON property scaleOutSize

Returns:

  • (Fixnum)


249
250
251
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 249

def scale_out_size
  @scale_out_size
end

#storage_thresholdsGoogle::Apis::VmwareengineV1::Thresholds

Thresholds define the utilization of resources triggering scale-out and scale- in operations. Corresponds to the JSON property storageThresholds



255
256
257
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 255

def storage_thresholds
  @storage_thresholds
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



262
263
264
265
266
267
268
269
# File 'lib/google/apis/vmwareengine_v1/classes.rb', line 262

def update!(**args)
  @consumed_memory_thresholds = args[:consumed_memory_thresholds] if args.key?(:consumed_memory_thresholds)
  @cpu_thresholds = args[:cpu_thresholds] if args.key?(:cpu_thresholds)
  @granted_memory_thresholds = args[:granted_memory_thresholds] if args.key?(:granted_memory_thresholds)
  @node_type_id = args[:node_type_id] if args.key?(:node_type_id)
  @scale_out_size = args[:scale_out_size] if args.key?(:scale_out_size)
  @storage_thresholds = args[:storage_thresholds] if args.key?(:storage_thresholds)
end