#[non_exhaustive]pub struct InstanceGroupManagerVersion {
pub instance_template: Option<String>,
pub name: Option<String>,
pub target_size: Option<FixedOrPercent>,
/* 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.instance_template: Option<String>The URL of the instance template that is specified for this managed
instance group. The group uses this template to create new instances in
the managed instance group until the targetSize for this version is
reached. The templates for existing instances in the group do not change
unless you run recreateInstances, runapplyUpdatesToInstances, or set the group’supdatePolicy.type to PROACTIVE; in those cases,
existing instances are updated until the targetSize for this version is
reached.
name: Option<String>Name of the version. Unique among all versions in the scope of this managed instance group.
target_size: Option<FixedOrPercent>Specifies the intended number of instances to be created from theinstanceTemplate. The final number of instances created from the template will be equal to:
- If expressed as a fixed number, the minimum of either
targetSize.fixed or
instanceGroupManager.targetSize is used.
- if expressed as a percent, the targetSize
would be (targetSize.percent/100 *
InstanceGroupManager.targetSize) If there is a remainder, the
number is rounded.If unset, this version will update any remaining instances not updated by another version. ReadStarting a canary update for more information.
Implementations§
Source§impl InstanceGroupManagerVersion
impl InstanceGroupManagerVersion
pub fn new() -> Self
Sourcepub fn set_instance_template<T>(self, v: T) -> Self
pub fn set_instance_template<T>(self, v: T) -> Self
Sets the value of instance_template.
§Example
let x = InstanceGroupManagerVersion::new().set_instance_template("example");Sourcepub fn set_or_clear_instance_template<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instance_template<T>(self, v: Option<T>) -> Self
Sets or clears the value of instance_template.
§Example
let x = InstanceGroupManagerVersion::new().set_or_clear_instance_template(Some("example"));
let x = InstanceGroupManagerVersion::new().set_or_clear_instance_template(None::<String>);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_target_size<T>(self, v: T) -> Selfwhere
T: Into<FixedOrPercent>,
pub fn set_target_size<T>(self, v: T) -> Selfwhere
T: Into<FixedOrPercent>,
Sets the value of target_size.
§Example
use google_cloud_compute_v1::model::FixedOrPercent;
let x = InstanceGroupManagerVersion::new().set_target_size(FixedOrPercent::default()/* use setters */);Sourcepub fn set_or_clear_target_size<T>(self, v: Option<T>) -> Selfwhere
T: Into<FixedOrPercent>,
pub fn set_or_clear_target_size<T>(self, v: Option<T>) -> Selfwhere
T: Into<FixedOrPercent>,
Sets or clears the value of target_size.
§Example
use google_cloud_compute_v1::model::FixedOrPercent;
let x = InstanceGroupManagerVersion::new().set_or_clear_target_size(Some(FixedOrPercent::default()/* use setters */));
let x = InstanceGroupManagerVersion::new().set_or_clear_target_size(None::<FixedOrPercent>);Trait Implementations§
Source§impl Clone for InstanceGroupManagerVersion
impl Clone for InstanceGroupManagerVersion
Source§fn clone(&self) -> InstanceGroupManagerVersion
fn clone(&self) -> InstanceGroupManagerVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more