#[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
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 (const: unstable) · 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
impl StructuralPartialEq for InstanceFlexibilityPolicyInstanceSelection
Auto Trait Implementations§
impl Freeze for InstanceFlexibilityPolicyInstanceSelection
impl RefUnwindSafe for InstanceFlexibilityPolicyInstanceSelection
impl Send for InstanceFlexibilityPolicyInstanceSelection
impl Sync for InstanceFlexibilityPolicyInstanceSelection
impl Unpin for InstanceFlexibilityPolicyInstanceSelection
impl UnsafeUnpin for InstanceFlexibilityPolicyInstanceSelection
impl UnwindSafe for InstanceFlexibilityPolicyInstanceSelection
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