Class: Google::Apis::ComputeBeta::InstanceGroupManagerInstanceLifecyclePolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceGroupManagerInstanceLifecyclePolicy

Returns a new instance of InstanceGroupManagerInstanceLifecyclePolicy.



24378
24379
24380
# File 'lib/google/apis/compute_beta/classes.rb', line 24378

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

Instance Attribute Details

#default_action_on_failureString

The action that a MIG performs on a failed VM. If the value of the onFailedHealthCheck field is DEFAULT_ACTION, then the same action also applies to the VMs on which your application fails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed VM by recreating it. For more information, seeAbout repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed VM. Corresponds to the JSON property defaultActionOnFailure

Returns:

  • (String)


24342
24343
24344
# File 'lib/google/apis/compute_beta/classes.rb', line 24342

def default_action_on_failure
  @default_action_on_failure
end

#force_update_on_repairString

A bit indicating whether to forcefully apply the group's latest configuration when repairing a VM. Valid options are:

  • NO (default): If configuration updates are available, they are not forcefully applied during repair. Instead, configuration updates are applied according to the group's update policy.

  • YES: If configuration updates are available, they are applied during repair. Corresponds to the JSON property forceUpdateOnRepair

Returns:

  • (String)


24356
24357
24358
# File 'lib/google/apis/compute_beta/classes.rb', line 24356

def force_update_on_repair
  @force_update_on_repair
end

#on_failed_health_checkString

The action that a MIG performs on an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are:

  • DEFAULT_ACTION (default): MIG uses the same action configured for instanceLifecyclePolicy.defaultActionOnFailure field.
  • REPAIR: MIG automatically repairs an unhealthy VM by recreating it.
  • DO_NOTHING: MIG doesn't repair an unhealthy VM. For more information, see About repairing VMs in a MIG. Corresponds to the JSON property onFailedHealthCheck

Returns:

  • (String)


24371
24372
24373
# File 'lib/google/apis/compute_beta/classes.rb', line 24371

def on_failed_health_check
  @on_failed_health_check
end

#on_repairGoogle::Apis::ComputeBeta::InstanceGroupManagerInstanceLifecyclePolicyOnRepair

Configuration for VM repairs in the MIG. Corresponds to the JSON property onRepair



24376
24377
24378
# File 'lib/google/apis/compute_beta/classes.rb', line 24376

def on_repair
  @on_repair
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24383
24384
24385
24386
24387
24388
# File 'lib/google/apis/compute_beta/classes.rb', line 24383

def update!(**args)
  @default_action_on_failure = args[:default_action_on_failure] if args.key?(:default_action_on_failure)
  @force_update_on_repair = args[:force_update_on_repair] if args.key?(:force_update_on_repair)
  @on_failed_health_check = args[:on_failed_health_check] if args.key?(:on_failed_health_check)
  @on_repair = args[:on_repair] if args.key?(:on_repair)
end