#[non_exhaustive]pub struct InstanceGroupManagerInstanceLifecyclePolicy {
pub default_action_on_failure: Option<DefaultActionOnFailure>,
pub force_update_on_repair: Option<ForceUpdateOnRepair>,
pub on_failed_health_check: Option<OnFailedHealthCheck>,
pub on_repair: Option<InstanceGroupManagerInstanceLifecyclePolicyOnRepair>,
/* private fields */
}instance-group-managers or region-instance-group-managers only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.default_action_on_failure: Option<DefaultActionOnFailure>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.
force_update_on_repair: Option<ForceUpdateOnRepair>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.on_failed_health_check: Option<OnFailedHealthCheck>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.
on_repair: Option<InstanceGroupManagerInstanceLifecyclePolicyOnRepair>Configuration for VM repairs in the MIG.
Implementations§
Source§impl InstanceGroupManagerInstanceLifecyclePolicy
impl InstanceGroupManagerInstanceLifecyclePolicy
Sourcepub fn set_default_action_on_failure<T>(self, v: T) -> Selfwhere
T: Into<DefaultActionOnFailure>,
pub fn set_default_action_on_failure<T>(self, v: T) -> Selfwhere
T: Into<DefaultActionOnFailure>,
Sets the value of default_action_on_failure.
§Example
use google_cloud_compute_v1::model::instance_group_manager_instance_lifecycle_policy::DefaultActionOnFailure;
let x0 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_default_action_on_failure(DefaultActionOnFailure::Repair);Sourcepub fn set_or_clear_default_action_on_failure<T>(self, v: Option<T>) -> Selfwhere
T: Into<DefaultActionOnFailure>,
pub fn set_or_clear_default_action_on_failure<T>(self, v: Option<T>) -> Selfwhere
T: Into<DefaultActionOnFailure>,
Sets or clears the value of default_action_on_failure.
§Example
use google_cloud_compute_v1::model::instance_group_manager_instance_lifecycle_policy::DefaultActionOnFailure;
let x0 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_default_action_on_failure(Some(DefaultActionOnFailure::Repair));
let x_none = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_default_action_on_failure(None::<DefaultActionOnFailure>);Sourcepub fn set_force_update_on_repair<T>(self, v: T) -> Selfwhere
T: Into<ForceUpdateOnRepair>,
pub fn set_force_update_on_repair<T>(self, v: T) -> Selfwhere
T: Into<ForceUpdateOnRepair>,
Sets the value of force_update_on_repair.
§Example
use google_cloud_compute_v1::model::instance_group_manager_instance_lifecycle_policy::ForceUpdateOnRepair;
let x0 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_force_update_on_repair(ForceUpdateOnRepair::Yes);Sourcepub fn set_or_clear_force_update_on_repair<T>(self, v: Option<T>) -> Selfwhere
T: Into<ForceUpdateOnRepair>,
pub fn set_or_clear_force_update_on_repair<T>(self, v: Option<T>) -> Selfwhere
T: Into<ForceUpdateOnRepair>,
Sets or clears the value of force_update_on_repair.
§Example
use google_cloud_compute_v1::model::instance_group_manager_instance_lifecycle_policy::ForceUpdateOnRepair;
let x0 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_force_update_on_repair(Some(ForceUpdateOnRepair::Yes));
let x_none = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_force_update_on_repair(None::<ForceUpdateOnRepair>);Sourcepub fn set_on_failed_health_check<T>(self, v: T) -> Selfwhere
T: Into<OnFailedHealthCheck>,
pub fn set_on_failed_health_check<T>(self, v: T) -> Selfwhere
T: Into<OnFailedHealthCheck>,
Sets the value of on_failed_health_check.
§Example
use google_cloud_compute_v1::model::instance_group_manager_instance_lifecycle_policy::OnFailedHealthCheck;
let x0 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_on_failed_health_check(OnFailedHealthCheck::DoNothing);
let x1 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_on_failed_health_check(OnFailedHealthCheck::Repair);Sourcepub fn set_or_clear_on_failed_health_check<T>(self, v: Option<T>) -> Selfwhere
T: Into<OnFailedHealthCheck>,
pub fn set_or_clear_on_failed_health_check<T>(self, v: Option<T>) -> Selfwhere
T: Into<OnFailedHealthCheck>,
Sets or clears the value of on_failed_health_check.
§Example
use google_cloud_compute_v1::model::instance_group_manager_instance_lifecycle_policy::OnFailedHealthCheck;
let x0 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_on_failed_health_check(Some(OnFailedHealthCheck::DoNothing));
let x1 = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_on_failed_health_check(Some(OnFailedHealthCheck::Repair));
let x_none = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_on_failed_health_check(None::<OnFailedHealthCheck>);Sourcepub fn set_on_repair<T>(self, v: T) -> Self
pub fn set_on_repair<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_on_repair<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_on_repair<T>(self, v: Option<T>) -> Self
Sets or clears the value of on_repair.
§Example
use google_cloud_compute_v1::model::InstanceGroupManagerInstanceLifecyclePolicyOnRepair;
let x = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_on_repair(Some(InstanceGroupManagerInstanceLifecyclePolicyOnRepair::default()/* use setters */));
let x = InstanceGroupManagerInstanceLifecyclePolicy::new().set_or_clear_on_repair(None::<InstanceGroupManagerInstanceLifecyclePolicyOnRepair>);Trait Implementations§
Source§impl Clone for InstanceGroupManagerInstanceLifecyclePolicy
impl Clone for InstanceGroupManagerInstanceLifecyclePolicy
Source§fn clone(&self) -> InstanceGroupManagerInstanceLifecyclePolicy
fn clone(&self) -> InstanceGroupManagerInstanceLifecyclePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for InstanceGroupManagerInstanceLifecyclePolicy
impl Default for InstanceGroupManagerInstanceLifecyclePolicy
Source§fn default() -> InstanceGroupManagerInstanceLifecyclePolicy
fn default() -> InstanceGroupManagerInstanceLifecyclePolicy
impl StructuralPartialEq for InstanceGroupManagerInstanceLifecyclePolicy
Auto Trait Implementations§
impl Freeze for InstanceGroupManagerInstanceLifecyclePolicy
impl RefUnwindSafe for InstanceGroupManagerInstanceLifecyclePolicy
impl Send for InstanceGroupManagerInstanceLifecyclePolicy
impl Sync for InstanceGroupManagerInstanceLifecyclePolicy
impl Unpin for InstanceGroupManagerInstanceLifecyclePolicy
impl UnsafeUnpin for InstanceGroupManagerInstanceLifecyclePolicy
impl UnwindSafe for InstanceGroupManagerInstanceLifecyclePolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request