Class: Google::Apis::ComputeV1::NodeGroupAutoscalingPolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NodeGroupAutoscalingPolicy

Returns a new instance of NodeGroupAutoscalingPolicy.



34461
34462
34463
# File 'lib/google/apis/compute_v1/classes.rb', line 34461

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

Instance Attribute Details

#max_nodesFixnum

The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100. Corresponds to the JSON property maxNodes

Returns:

  • (Fixnum)


34447
34448
34449
# File 'lib/google/apis/compute_v1/classes.rb', line 34447

def max_nodes
  @max_nodes
end

#min_nodesFixnum

The minimum number of nodes that the group should have. Corresponds to the JSON property minNodes

Returns:

  • (Fixnum)


34452
34453
34454
# File 'lib/google/apis/compute_v1/classes.rb', line 34452

def min_nodes
  @min_nodes
end

#modeString

The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes. Corresponds to the JSON property mode

Returns:

  • (String)


34459
34460
34461
# File 'lib/google/apis/compute_v1/classes.rb', line 34459

def mode
  @mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



34466
34467
34468
34469
34470
# File 'lib/google/apis/compute_v1/classes.rb', line 34466

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