Class: Google::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicy

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

Returns a new instance of InstanceGroupManagerInstanceLifecyclePolicy.



18679
18680
18681
# File 'lib/google/apis/compute_alpha/classes.rb', line 18679

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

Instance Attribute Details

#default_action_on_failureString

The action that a MIG performs on a failed or an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed or an unhealthy VM by recreating it. For more information, see About repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed or an unhealthy VM. Corresponds to the JSON property defaultActionOnFailure

Returns:

  • (String)


18641
18642
18643
# File 'lib/google/apis/compute_alpha/classes.rb', line 18641

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)


18650
18651
18652
# File 'lib/google/apis/compute_alpha/classes.rb', line 18650

def force_update_on_repair
  @force_update_on_repair
end

#metadata_based_readiness_signalGoogle::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal

The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance. If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method. If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them. Corresponds to the JSON property metadataBasedReadinessSignal



18664
18665
18666
# File 'lib/google/apis/compute_alpha/classes.rb', line 18664

def 
  @metadata_based_readiness_signal
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): The MIG performs the same action as specified in the instanceLifecyclePolicy.defaultActionOnFailure field. If the defaultActionOnFailure field is set to REPAIR, then the MIG repairs unhealthy VMs. If the defaultActionOnFailure field is set to DO_NOTHING, then the MIG doesn't repair unhealthy VMs. - REPAIR: The MIG repairs unhealthy VMs by recreating it. - DO_NOTHING: The MIG doesn't repair unhealthy VMs. For more information, see About repairing VMs in a MIG. Corresponds to the JSON property onFailedHealthCheck

Returns:

  • (String)


18677
18678
18679
# File 'lib/google/apis/compute_alpha/classes.rb', line 18677

def on_failed_health_check
  @on_failed_health_check
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



18684
18685
18686
18687
18688
18689
# File 'lib/google/apis/compute_alpha/classes.rb', line 18684

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)
  @metadata_based_readiness_signal = args[:metadata_based_readiness_signal] if args.key?(:metadata_based_readiness_signal)
  @on_failed_health_check = args[:on_failed_health_check] if args.key?(:on_failed_health_check)
end