Class: Google::Apis::ComputeAlpha::InstanceGroupManagerUpdatePolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceGroupManagerUpdatePolicy

Returns a new instance of InstanceGroupManagerUpdatePolicy.



17778
17779
17780
# File 'lib/google/apis/compute_alpha/classes.rb', line 17778

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

Instance Attribute Details

#instance_redistribution_typeString

The instance redistribution policy for regional managed instance groups. Valid values are: - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region. - NONE: For non- autoscaled groups, proactive redistribution is disabled. Corresponds to the JSON property instanceRedistributionType

Returns:

  • (String)


17721
17722
17723
# File 'lib/google/apis/compute_alpha/classes.rb', line 17721

def instance_redistribution_type
  @instance_redistribution_type
end

#max_surgeGoogle::Apis::ComputeAlpha::FixedOrPercent

Encapsulates numeric value that can be either absolute or relative. Corresponds to the JSON property maxSurge



17726
17727
17728
# File 'lib/google/apis/compute_alpha/classes.rb', line 17726

def max_surge
  @max_surge
end

#max_unavailableGoogle::Apis::ComputeAlpha::FixedOrPercent

Encapsulates numeric value that can be either absolute or relative. Corresponds to the JSON property maxUnavailable



17731
17732
17733
# File 'lib/google/apis/compute_alpha/classes.rb', line 17731

def max_unavailable
  @max_unavailable
end

#min_ready_secFixnum

Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]. Corresponds to the JSON property minReadySec

Returns:

  • (Fixnum)


17737
17738
17739
# File 'lib/google/apis/compute_alpha/classes.rb', line 17737

def min_ready_sec
  @min_ready_sec
end

#minimal_actionString

Minimal action to be taken on an instance. Use this option to minimize disruption as much as possible or to apply a more disruptive action than is necessary. - To limit disruption as much as possible, set the minimal action to REFRESH. If your update requires a more disruptive action, Compute Engine performs the necessary action to execute the update. - To apply a more disruptive action than is strictly necessary, set the minimal action to RESTART or REPLACE. For example, Compute Engine does not need to restart a VM to change its metadata. But if your application reads instance metadata only when a VM is restarted, you can set the minimal action to RESTART in order to pick up metadata changes. Corresponds to the JSON property minimalAction

Returns:

  • (String)


17751
17752
17753
# File 'lib/google/apis/compute_alpha/classes.rb', line 17751

def minimal_action
  @minimal_action
end

#most_disruptive_allowed_actionString

Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all. Corresponds to the JSON property mostDisruptiveAllowedAction

Returns:

  • (String)


17762
17763
17764
# File 'lib/google/apis/compute_alpha/classes.rb', line 17762

def most_disruptive_allowed_action
  @most_disruptive_allowed_action
end

#replacement_methodString

What action should be used to replace instances. See minimal_action.REPLACE Corresponds to the JSON property replacementMethod

Returns:

  • (String)


17767
17768
17769
# File 'lib/google/apis/compute_alpha/classes.rb', line 17767

def replacement_method
  @replacement_method
end

#typeString

The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). Corresponds to the JSON property type

Returns:

  • (String)


17776
17777
17778
# File 'lib/google/apis/compute_alpha/classes.rb', line 17776

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
# File 'lib/google/apis/compute_alpha/classes.rb', line 17783

def update!(**args)
  @instance_redistribution_type = args[:instance_redistribution_type] if args.key?(:instance_redistribution_type)
  @max_surge = args[:max_surge] if args.key?(:max_surge)
  @max_unavailable = args[:max_unavailable] if args.key?(:max_unavailable)
  @min_ready_sec = args[:min_ready_sec] if args.key?(:min_ready_sec)
  @minimal_action = args[:minimal_action] if args.key?(:minimal_action)
  @most_disruptive_allowed_action = args[:most_disruptive_allowed_action] if args.key?(:most_disruptive_allowed_action)
  @replacement_method = args[:replacement_method] if args.key?(:replacement_method)
  @type = args[:type] if args.key?(:type)
end