Struct google_api_proto::google::cloud::batch::v1alpha::allocation_policy::InstancePolicy
source · pub struct InstancePolicy {
pub allowed_machine_types: Vec<String>,
pub machine_type: String,
pub min_cpu_platform: String,
pub provisioning_model: i32,
pub accelerators: Vec<Accelerator>,
pub boot_disk: Option<Disk>,
pub disks: Vec<AttachedDisk>,
pub reservation: String,
}
Expand description
InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.
Fields§
§allowed_machine_types: Vec<String>
Deprecated: please use machine_type instead.
machine_type: String
The Compute Engine machine type.
min_cpu_platform: String
The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
provisioning_model: i32
The provisioning model.
accelerators: Vec<Accelerator>
The accelerators attached to each VM instance.
boot_disk: Option<Disk>
Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.
disks: Vec<AttachedDisk>
Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.
reservation: String
Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation.
Implementations§
source§impl InstancePolicy
impl InstancePolicy
sourcepub fn provisioning_model(&self) -> ProvisioningModel
pub fn provisioning_model(&self) -> ProvisioningModel
Returns the enum value of provisioning_model
, or the default if the field is set to an invalid enum value.
sourcepub fn set_provisioning_model(&mut self, value: ProvisioningModel)
pub fn set_provisioning_model(&mut self, value: ProvisioningModel)
Sets provisioning_model
to the provided enum value.
Trait Implementations§
source§impl Clone for InstancePolicy
impl Clone for InstancePolicy
source§fn clone(&self) -> InstancePolicy
fn clone(&self) -> InstancePolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstancePolicy
impl Debug for InstancePolicy
source§impl Default for InstancePolicy
impl Default for InstancePolicy
source§impl Message for InstancePolicy
impl Message for InstancePolicy
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for InstancePolicy
impl PartialEq for InstancePolicy
source§fn eq(&self, other: &InstancePolicy) -> bool
fn eq(&self, other: &InstancePolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InstancePolicy
Auto Trait Implementations§
impl Freeze for InstancePolicy
impl RefUnwindSafe for InstancePolicy
impl Send for InstancePolicy
impl Sync for InstancePolicy
impl Unpin for InstancePolicy
impl UnwindSafe for InstancePolicy
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<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