#[non_exhaustive]pub struct ManagedInstance {
pub current_action: Option<CurrentAction>,
pub id: Option<u64>,
pub instance: Option<String>,
pub instance_health: Vec<ManagedInstanceInstanceHealth>,
pub instance_status: Option<InstanceStatus>,
pub last_attempt: Option<ManagedInstanceLastAttempt>,
pub name: Option<String>,
pub preserved_state_from_config: Option<PreservedState>,
pub preserved_state_from_policy: Option<PreservedState>,
pub properties_from_flexibility_policy: Option<ManagedInstancePropertiesFromFlexibilityPolicy>,
pub version: Option<ManagedInstanceVersion>,
/* private fields */
}instance-group-managers or region-instance-group-managers only.Expand description
A Managed Instance resource.
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.current_action: Option<CurrentAction>Output only. [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
- NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
- CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful.
- CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group’stargetSize value is decreased instead.
- RECREATING The managed instance group is recreating this instance.
- DELETING The managed instance group is permanently deleting this instance.
- ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group.
- RESTARTING The managed instance group is restarting the instance.
- REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.
- VERIFYING The managed instance group has created the instance and it is in the process of being verified.
id: Option<u64>Output only. [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
instance: Option<String>Output only. [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
instance_health: Vec<ManagedInstanceInstanceHealth>Output only. [Output Only] Health state of the instance per health-check.
instance_status: Option<InstanceStatus>Output only. [Output Only] The status of the instance. This field is empty when the instance does not exist.
last_attempt: Option<ManagedInstanceLastAttempt>Output only. [Output Only] Information about the last attempt to create or delete the instance.
name: Option<String>Output only. [Output Only] The name of the instance. The name always exists even if the instance has not yet been created.
preserved_state_from_config: Option<PreservedState>Output only. [Output Only] Preserved state applied from per-instance config for this instance.
preserved_state_from_policy: Option<PreservedState>Output only. [Output Only] Preserved state generated based on stateful policy for this instance.
properties_from_flexibility_policy: Option<ManagedInstancePropertiesFromFlexibilityPolicy>Output only. [Output Only] Instance properties selected for this instance resulting from InstanceFlexibilityPolicy.
version: Option<ManagedInstanceVersion>Output only. [Output Only] Intended version of this instance.
Implementations§
Source§impl ManagedInstance
impl ManagedInstance
pub fn new() -> Self
Sourcepub fn set_current_action<T>(self, v: T) -> Selfwhere
T: Into<CurrentAction>,
pub fn set_current_action<T>(self, v: T) -> Selfwhere
T: Into<CurrentAction>,
Sets the value of current_action.
§Example
use google_cloud_compute_v1::model::managed_instance::CurrentAction;
let x0 = ManagedInstance::new().set_current_action(CurrentAction::Creating);
let x1 = ManagedInstance::new().set_current_action(CurrentAction::CreatingWithoutRetries);
let x2 = ManagedInstance::new().set_current_action(CurrentAction::Deleting);Sourcepub fn set_or_clear_current_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<CurrentAction>,
pub fn set_or_clear_current_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<CurrentAction>,
Sets or clears the value of current_action.
§Example
use google_cloud_compute_v1::model::managed_instance::CurrentAction;
let x0 = ManagedInstance::new().set_or_clear_current_action(Some(CurrentAction::Creating));
let x1 = ManagedInstance::new().set_or_clear_current_action(Some(CurrentAction::CreatingWithoutRetries));
let x2 = ManagedInstance::new().set_or_clear_current_action(Some(CurrentAction::Deleting));
let x_none = ManagedInstance::new().set_or_clear_current_action(None::<CurrentAction>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_instance<T>(self, v: T) -> Self
pub fn set_instance<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
Sourcepub fn set_instance_health<T, V>(self, v: T) -> Self
pub fn set_instance_health<T, V>(self, v: T) -> Self
Sets the value of instance_health.
§Example
use google_cloud_compute_v1::model::ManagedInstanceInstanceHealth;
let x = ManagedInstance::new()
.set_instance_health([
ManagedInstanceInstanceHealth::default()/* use setters */,
ManagedInstanceInstanceHealth::default()/* use (different) setters */,
]);Sourcepub fn set_instance_status<T>(self, v: T) -> Selfwhere
T: Into<InstanceStatus>,
pub fn set_instance_status<T>(self, v: T) -> Selfwhere
T: Into<InstanceStatus>,
Sets the value of instance_status.
§Example
use google_cloud_compute_v1::model::managed_instance::InstanceStatus;
let x0 = ManagedInstance::new().set_instance_status(InstanceStatus::Pending);
let x1 = ManagedInstance::new().set_instance_status(InstanceStatus::Provisioning);
let x2 = ManagedInstance::new().set_instance_status(InstanceStatus::Repairing);Sourcepub fn set_or_clear_instance_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceStatus>,
pub fn set_or_clear_instance_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceStatus>,
Sets or clears the value of instance_status.
§Example
use google_cloud_compute_v1::model::managed_instance::InstanceStatus;
let x0 = ManagedInstance::new().set_or_clear_instance_status(Some(InstanceStatus::Pending));
let x1 = ManagedInstance::new().set_or_clear_instance_status(Some(InstanceStatus::Provisioning));
let x2 = ManagedInstance::new().set_or_clear_instance_status(Some(InstanceStatus::Repairing));
let x_none = ManagedInstance::new().set_or_clear_instance_status(None::<InstanceStatus>);Sourcepub fn set_last_attempt<T>(self, v: T) -> Selfwhere
T: Into<ManagedInstanceLastAttempt>,
pub fn set_last_attempt<T>(self, v: T) -> Selfwhere
T: Into<ManagedInstanceLastAttempt>,
Sets the value of last_attempt.
§Example
use google_cloud_compute_v1::model::ManagedInstanceLastAttempt;
let x = ManagedInstance::new().set_last_attempt(ManagedInstanceLastAttempt::default()/* use setters */);Sourcepub fn set_or_clear_last_attempt<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagedInstanceLastAttempt>,
pub fn set_or_clear_last_attempt<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagedInstanceLastAttempt>,
Sets or clears the value of last_attempt.
§Example
use google_cloud_compute_v1::model::ManagedInstanceLastAttempt;
let x = ManagedInstance::new().set_or_clear_last_attempt(Some(ManagedInstanceLastAttempt::default()/* use setters */));
let x = ManagedInstance::new().set_or_clear_last_attempt(None::<ManagedInstanceLastAttempt>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_preserved_state_from_config<T>(self, v: T) -> Selfwhere
T: Into<PreservedState>,
pub fn set_preserved_state_from_config<T>(self, v: T) -> Selfwhere
T: Into<PreservedState>,
Sets the value of preserved_state_from_config.
§Example
use google_cloud_compute_v1::model::PreservedState;
let x = ManagedInstance::new().set_preserved_state_from_config(PreservedState::default()/* use setters */);Sourcepub fn set_or_clear_preserved_state_from_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreservedState>,
pub fn set_or_clear_preserved_state_from_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreservedState>,
Sets or clears the value of preserved_state_from_config.
§Example
use google_cloud_compute_v1::model::PreservedState;
let x = ManagedInstance::new().set_or_clear_preserved_state_from_config(Some(PreservedState::default()/* use setters */));
let x = ManagedInstance::new().set_or_clear_preserved_state_from_config(None::<PreservedState>);Sourcepub fn set_preserved_state_from_policy<T>(self, v: T) -> Selfwhere
T: Into<PreservedState>,
pub fn set_preserved_state_from_policy<T>(self, v: T) -> Selfwhere
T: Into<PreservedState>,
Sets the value of preserved_state_from_policy.
§Example
use google_cloud_compute_v1::model::PreservedState;
let x = ManagedInstance::new().set_preserved_state_from_policy(PreservedState::default()/* use setters */);Sourcepub fn set_or_clear_preserved_state_from_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreservedState>,
pub fn set_or_clear_preserved_state_from_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreservedState>,
Sets or clears the value of preserved_state_from_policy.
§Example
use google_cloud_compute_v1::model::PreservedState;
let x = ManagedInstance::new().set_or_clear_preserved_state_from_policy(Some(PreservedState::default()/* use setters */));
let x = ManagedInstance::new().set_or_clear_preserved_state_from_policy(None::<PreservedState>);Sourcepub fn set_properties_from_flexibility_policy<T>(self, v: T) -> Self
pub fn set_properties_from_flexibility_policy<T>(self, v: T) -> Self
Sets the value of properties_from_flexibility_policy.
§Example
use google_cloud_compute_v1::model::ManagedInstancePropertiesFromFlexibilityPolicy;
let x = ManagedInstance::new().set_properties_from_flexibility_policy(ManagedInstancePropertiesFromFlexibilityPolicy::default()/* use setters */);Sourcepub fn set_or_clear_properties_from_flexibility_policy<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_properties_from_flexibility_policy<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of properties_from_flexibility_policy.
§Example
use google_cloud_compute_v1::model::ManagedInstancePropertiesFromFlexibilityPolicy;
let x = ManagedInstance::new().set_or_clear_properties_from_flexibility_policy(Some(ManagedInstancePropertiesFromFlexibilityPolicy::default()/* use setters */));
let x = ManagedInstance::new().set_or_clear_properties_from_flexibility_policy(None::<ManagedInstancePropertiesFromFlexibilityPolicy>);Sourcepub fn set_version<T>(self, v: T) -> Selfwhere
T: Into<ManagedInstanceVersion>,
pub fn set_version<T>(self, v: T) -> Selfwhere
T: Into<ManagedInstanceVersion>,
Sourcepub fn set_or_clear_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagedInstanceVersion>,
pub fn set_or_clear_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagedInstanceVersion>,
Sets or clears the value of version.
§Example
use google_cloud_compute_v1::model::ManagedInstanceVersion;
let x = ManagedInstance::new().set_or_clear_version(Some(ManagedInstanceVersion::default()/* use setters */));
let x = ManagedInstance::new().set_or_clear_version(None::<ManagedInstanceVersion>);Trait Implementations§
Source§impl Clone for ManagedInstance
impl Clone for ManagedInstance
Source§fn clone(&self) -> ManagedInstance
fn clone(&self) -> ManagedInstance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more