#[non_exhaustive]pub struct NewSpotInstancesConfig {
pub zone: String,
pub machine_type: String,
pub termination_action: TerminationAction,
/* private fields */
}Expand description
When set in a ComputeResourceConfig, indicates that spot VM instances should be created.
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.zone: StringRequired. Immutable. Name of the zone in which VM instances should run,
e.g., us-central1-a. Must be in the same region as the cluster, and must
match the zone of any other resources specified in the cluster.
machine_type: StringRequired. Immutable. Name of the Compute Engine machine
type to use, e.g.
n2-standard-2.
termination_action: TerminationActionOptional. Termination action for the instance. If not specified, Compute Engine sets the termination action to DELETE.
Implementations§
Source§impl NewSpotInstancesConfig
impl NewSpotInstancesConfig
Sourcepub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
pub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
Sets the value of machine_type.
§Example
ⓘ
let x = NewSpotInstancesConfig::new().set_machine_type("example");Sourcepub fn set_termination_action<T: Into<TerminationAction>>(self, v: T) -> Self
pub fn set_termination_action<T: Into<TerminationAction>>(self, v: T) -> Self
Sets the value of termination_action.
§Example
ⓘ
use google_cloud_hypercomputecluster_v1::model::new_spot_instances_config::TerminationAction;
let x0 = NewSpotInstancesConfig::new().set_termination_action(TerminationAction::Stop);
let x1 = NewSpotInstancesConfig::new().set_termination_action(TerminationAction::Delete);Trait Implementations§
Source§impl Clone for NewSpotInstancesConfig
impl Clone for NewSpotInstancesConfig
Source§impl Debug for NewSpotInstancesConfig
impl Debug for NewSpotInstancesConfig
Source§impl Default for NewSpotInstancesConfig
impl Default for NewSpotInstancesConfig
Source§impl Message for NewSpotInstancesConfig
impl Message for NewSpotInstancesConfig
Source§impl PartialEq for NewSpotInstancesConfig
impl PartialEq for NewSpotInstancesConfig
impl StructuralPartialEq for NewSpotInstancesConfig
Auto Trait Implementations§
impl Freeze for NewSpotInstancesConfig
impl RefUnwindSafe for NewSpotInstancesConfig
impl Send for NewSpotInstancesConfig
impl Sync for NewSpotInstancesConfig
impl Unpin for NewSpotInstancesConfig
impl UnsafeUnpin for NewSpotInstancesConfig
impl UnwindSafe for NewSpotInstancesConfig
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request