#[non_exhaustive]pub struct InstanceFlexibilityPolicyInstanceSelection {
pub disks: Vec<AttachedDisk>,
pub machine_types: Vec<String>,
pub rank: Option<i64>,
/* private fields */
}instances or region-instances only.Expand description
Specification of machine type to use. Every position inside this message is an alternative. The count specified in the shape flexibility must not exceed the number of entries in per_instance_properties or the capacity of the name_pattern, if used.
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.disks: Vec<AttachedDisk>Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
machine_types: Vec<String>Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
rank: Option<i64>Rank when prioritizing the shape flexibilities. The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
Implementations§
Source§impl InstanceFlexibilityPolicyInstanceSelection
impl InstanceFlexibilityPolicyInstanceSelection
pub fn new() -> Self
Sourcepub fn set_machine_types<T, V>(self, v: T) -> Self
pub fn set_machine_types<T, V>(self, v: T) -> Self
Sets the value of machine_types.
§Example
let x = InstanceFlexibilityPolicyInstanceSelection::new().set_machine_types(["a", "b", "c"]);Sourcepub fn set_or_clear_rank<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rank<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for InstanceFlexibilityPolicyInstanceSelection
impl Clone for InstanceFlexibilityPolicyInstanceSelection
Source§fn clone(&self) -> InstanceFlexibilityPolicyInstanceSelection
fn clone(&self) -> InstanceFlexibilityPolicyInstanceSelection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for InstanceFlexibilityPolicyInstanceSelection
impl Default for InstanceFlexibilityPolicyInstanceSelection
Source§fn default() -> InstanceFlexibilityPolicyInstanceSelection
fn default() -> InstanceFlexibilityPolicyInstanceSelection
Source§impl PartialEq for InstanceFlexibilityPolicyInstanceSelection
impl PartialEq for InstanceFlexibilityPolicyInstanceSelection
Source§fn eq(&self, other: &InstanceFlexibilityPolicyInstanceSelection) -> bool
fn eq(&self, other: &InstanceFlexibilityPolicyInstanceSelection) -> bool
self and other values to be equal, and is used by ==.