Struct google_api_proto::google::cloud::batch::v1::allocation_policy::InstancePolicyOrTemplate
source · pub struct InstancePolicyOrTemplate {
pub install_gpu_drivers: bool,
pub install_ops_agent: bool,
pub block_project_ssh_keys: bool,
pub policy_template: Option<PolicyTemplate>,
}
Expand description
InstancePolicyOrTemplate lets you define the type of resources to use for this job either with an InstancePolicy or an instance template. If undefined, Batch picks the type of VM to use and doesn’t include optional VM resources such as GPUs and extra disks.
Fields§
§install_gpu_drivers: bool
Set this field true if you want Batch to help fetch drivers from a third
party location and install them for GPUs specified in
policy.accelerators
or instance_template
on your behalf. Default is
false.
For Container-Optimized Image cases, Batch will install the accelerator driver following milestones of https://cloud.google.com/container-optimized-os/docs/release-notes. For non Container-Optimized Image cases, following https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.
install_ops_agent: bool
Optional. Set this field true if you want Batch to install Ops Agent on your behalf. Default is false.
block_project_ssh_keys: bool
Optional. Set this field to true
if you want Batch to block
project-level SSH keys from accessing this job’s VMs. Alternatively, you
can configure the job to specify a VM instance template that blocks
project-level SSH keys. In either case, Batch blocks project-level SSH
keys while creating the VMs for this job.
Batch allows project-level SSH keys for a job’s VMs only if all the following are true:
- This field is undefined or set to
false
. - The job’s VM instance template (if any) doesn’t block project-level SSH keys.
Notably, you can override this behavior by manually updating a VM to block or allow project-level SSH keys. For more information about blocking project-level SSH keys, see the Compute Engine documentation: https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys
policy_template: Option<PolicyTemplate>
Trait Implementations§
source§impl Clone for InstancePolicyOrTemplate
impl Clone for InstancePolicyOrTemplate
source§fn clone(&self) -> InstancePolicyOrTemplate
fn clone(&self) -> InstancePolicyOrTemplate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstancePolicyOrTemplate
impl Debug for InstancePolicyOrTemplate
source§impl Default for InstancePolicyOrTemplate
impl Default for InstancePolicyOrTemplate
source§impl Message for InstancePolicyOrTemplate
impl Message for InstancePolicyOrTemplate
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 InstancePolicyOrTemplate
impl PartialEq for InstancePolicyOrTemplate
source§fn eq(&self, other: &InstancePolicyOrTemplate) -> bool
fn eq(&self, other: &InstancePolicyOrTemplate) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InstancePolicyOrTemplate
Auto Trait Implementations§
impl Freeze for InstancePolicyOrTemplate
impl RefUnwindSafe for InstancePolicyOrTemplate
impl Send for InstancePolicyOrTemplate
impl Sync for InstancePolicyOrTemplate
impl Unpin for InstancePolicyOrTemplate
impl UnwindSafe for InstancePolicyOrTemplate
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