Skip to main content

ManagedInstance

Struct ManagedInstance 

Source
#[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 */ }
Available on crate features 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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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

Source

pub fn new() -> Self

Source

pub fn set_current_action<T>(self, v: T) -> Self
where 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);
Source

pub fn set_or_clear_current_action<T>(self, v: Option<T>) -> Self
where 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>);
Source

pub fn set_id<T>(self, v: T) -> Self
where T: Into<u64>,

Sets the value of id.

§Example
let x = ManagedInstance::new().set_id(42_u32);
Source

pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
where T: Into<u64>,

Sets or clears the value of id.

§Example
let x = ManagedInstance::new().set_or_clear_id(Some(42_u32));
let x = ManagedInstance::new().set_or_clear_id(None::<u32>);
Source

pub fn set_instance<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of instance.

§Example
let x = ManagedInstance::new().set_instance("example");
Source

pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of instance.

§Example
let x = ManagedInstance::new().set_or_clear_instance(Some("example"));
let x = ManagedInstance::new().set_or_clear_instance(None::<String>);
Source

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 */,
    ]);
Source

pub fn set_instance_status<T>(self, v: T) -> Self
where 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);
Source

pub fn set_or_clear_instance_status<T>(self, v: Option<T>) -> Self
where 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>);
Source

pub fn set_last_attempt<T>(self, v: T) -> Self

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 */);
Source

pub fn set_or_clear_last_attempt<T>(self, v: Option<T>) -> Self

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>);
Source

pub fn set_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of name.

§Example
let x = ManagedInstance::new().set_name("example");
Source

pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of name.

§Example
let x = ManagedInstance::new().set_or_clear_name(Some("example"));
let x = ManagedInstance::new().set_or_clear_name(None::<String>);
Source

pub fn set_preserved_state_from_config<T>(self, v: T) -> Self
where 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 */);
Source

pub fn set_or_clear_preserved_state_from_config<T>(self, v: Option<T>) -> Self
where 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>);
Source

pub fn set_preserved_state_from_policy<T>(self, v: T) -> Self
where 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 */);
Source

pub fn set_or_clear_preserved_state_from_policy<T>(self, v: Option<T>) -> Self
where 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>);
Source

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 */);
Source

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>);
Source

pub fn set_version<T>(self, v: T) -> Self

Sets the value of version.

§Example
use google_cloud_compute_v1::model::ManagedInstanceVersion;
let x = ManagedInstance::new().set_version(ManagedInstanceVersion::default()/* use setters */);
Source

pub fn set_or_clear_version<T>(self, v: Option<T>) -> Self

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

Source§

fn clone(&self) -> ManagedInstance

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ManagedInstance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ManagedInstance

Source§

fn default() -> ManagedInstance

Returns the “default value” for a type. Read more
Source§

impl Message for ManagedInstance

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for ManagedInstance

Source§

fn eq(&self, other: &ManagedInstance) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ManagedInstance

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,