Enum google_api_proto::google::cloud::compute::v1::distribution_policy::TargetShape
source · #[repr(i32)]pub enum TargetShape {
UndefinedTargetShape = 0,
Any = 64_972,
AnySingleZone = 61_100_880,
Balanced = 468_409_608,
Even = 2_140_442,
}
Expand description
The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).
Variants§
UndefinedTargetShape = 0
A value indicating that the enum field is not set.
Any = 64_972
The group picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability.
AnySingleZone = 61_100_880
The group creates all VM instances within a single zone. The zone is selected based on the present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads with heavy interprocess communication.
Balanced = 468_409_608
The group prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across selected zones to minimize the impact of zonal failure. Recommended for highly available serving workloads.
Even = 2_140_442
The group schedules VM instance creation and deletion to achieve and maintain an even number of managed instances across the selected zones. The distribution is even when the number of managed instances does not differ by more than 1 between any two zones. Recommended for highly available serving workloads.
Implementations§
source§impl TargetShape
impl TargetShape
source§impl TargetShape
impl TargetShape
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for TargetShape
impl Clone for TargetShape
source§fn clone(&self) -> TargetShape
fn clone(&self) -> TargetShape
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TargetShape
impl Debug for TargetShape
source§impl Default for TargetShape
impl Default for TargetShape
source§fn default() -> TargetShape
fn default() -> TargetShape
source§impl From<TargetShape> for i32
impl From<TargetShape> for i32
source§fn from(value: TargetShape) -> i32
fn from(value: TargetShape) -> i32
source§impl Hash for TargetShape
impl Hash for TargetShape
source§impl Ord for TargetShape
impl Ord for TargetShape
source§fn cmp(&self, other: &TargetShape) -> Ordering
fn cmp(&self, other: &TargetShape) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for TargetShape
impl PartialEq for TargetShape
source§fn eq(&self, other: &TargetShape) -> bool
fn eq(&self, other: &TargetShape) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TargetShape
impl PartialOrd for TargetShape
source§fn partial_cmp(&self, other: &TargetShape) -> Option<Ordering>
fn partial_cmp(&self, other: &TargetShape) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for TargetShape
impl TryFrom<i32> for TargetShape
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<TargetShape, UnknownEnumValue>
fn try_from(value: i32) -> Result<TargetShape, UnknownEnumValue>
impl Copy for TargetShape
impl Eq for TargetShape
impl StructuralPartialEq for TargetShape
Auto Trait Implementations§
impl Freeze for TargetShape
impl RefUnwindSafe for TargetShape
impl Send for TargetShape
impl Sync for TargetShape
impl Unpin for TargetShape
impl UnwindSafe for TargetShape
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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