Class: Google::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicy
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicy
- 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
-
#default_action_on_failure ⇒ String
The action that a MIG performs on a failed VM.
-
#force_update_on_repair ⇒ String
A bit indicating whether to forcefully apply the group's latest configuration when repairing a VM.
-
#metadata_based_readiness_signal ⇒ Google::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal
The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance.
-
#on_failed_health_check ⇒ String
The action that a MIG performs on an unhealthy VM.
-
#on_repair ⇒ Google::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicyOnRepair
Configuration for VM repairs in the MIG.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InstanceGroupManagerInstanceLifecyclePolicy
constructor
A new instance of InstanceGroupManagerInstanceLifecyclePolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InstanceGroupManagerInstanceLifecyclePolicy
Returns a new instance of InstanceGroupManagerInstanceLifecyclePolicy.
27519 27520 27521 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27519 def initialize(**args) update!(**args) end |
Instance Attribute Details
#default_action_on_failure ⇒ String
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, see about repairing VMs in a MIG. -
DO_NOTHING: MIG
does not repair a failed VM.
Corresponds to the JSON property defaultActionOnFailure
27467 27468 27469 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27467 def default_action_on_failure @default_action_on_failure end |
#force_update_on_repair ⇒ String
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
27481 27482 27483 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27481 def force_update_on_repair @force_update_on_repair end |
#metadata_based_readiness_signal ⇒ Google::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
27497 27498 27499 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27497 def @metadata_based_readiness_signal end |
#on_failed_health_check ⇒ String
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
27512 27513 27514 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27512 def on_failed_health_check @on_failed_health_check end |
#on_repair ⇒ Google::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicyOnRepair
Configuration for VM repairs in the MIG.
Corresponds to the JSON property onRepair
27517 27518 27519 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27517 def on_repair @on_repair end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
27524 27525 27526 27527 27528 27529 27530 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 27524 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) @on_repair = args[:on_repair] if args.key?(:on_repair) end |