Struct google_api_proto::google::cloud::batch::v1::AllocationPolicy
source · pub struct AllocationPolicy {
pub location: Option<LocationPolicy>,
pub instances: Vec<InstancePolicyOrTemplate>,
pub service_account: Option<ServiceAccount>,
pub labels: BTreeMap<String, String>,
pub network: Option<NetworkPolicy>,
pub placement: Option<PlacementPolicy>,
pub tags: Vec<String>,
}
Expand description
A Job’s resource allocation policy describes when, where, and how compute resources should be allocated for the Job.
Fields§
§location: Option<LocationPolicy>
Location where compute resources should be allocated for the Job.
instances: Vec<InstancePolicyOrTemplate>
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
service_account: Option<ServiceAccount>
Defines the service account for Batch-created VMs. If omitted, the default Compute Engine service account is used. Must match the service account specified in any used instance template configured in the Batch job.
Includes the following fields:
- email: The service account’s email address. If not set, the default Compute Engine service account is used.
- scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
labels: BTreeMap<String, String>
Labels applied to all VM instances and other resources created by AllocationPolicy. Labels could be user provided or system generated. You can assign up to 64 labels. Google Compute Engine label restrictions apply. Label names that start with “goog-” or “google-” are reserved.
network: Option<NetworkPolicy>
The network policy.
If you define an instance template in the InstancePolicyOrTemplate
field,
Batch will use the network settings in the instance template instead of
this field.
placement: Option<PlacementPolicy>
The placement policy.
Optional. Tags applied to the VM instances.
The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with RFC1035.
Trait Implementations§
source§impl Clone for AllocationPolicy
impl Clone for AllocationPolicy
source§fn clone(&self) -> AllocationPolicy
fn clone(&self) -> AllocationPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AllocationPolicy
impl Debug for AllocationPolicy
source§impl Default for AllocationPolicy
impl Default for AllocationPolicy
source§impl Message for AllocationPolicy
impl Message for AllocationPolicy
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 AllocationPolicy
impl PartialEq for AllocationPolicy
source§fn eq(&self, other: &AllocationPolicy) -> bool
fn eq(&self, other: &AllocationPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AllocationPolicy
Auto Trait Implementations§
impl Freeze for AllocationPolicy
impl RefUnwindSafe for AllocationPolicy
impl Send for AllocationPolicy
impl Sync for AllocationPolicy
impl Unpin for AllocationPolicy
impl UnwindSafe for AllocationPolicy
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