Struct google_api_proto::google::cloud::osconfig::v1beta::Assignment
source · pub struct Assignment {
pub group_labels: Vec<GroupLabel>,
pub zones: Vec<String>,
pub instances: Vec<String>,
pub instance_name_prefixes: Vec<String>,
pub os_types: Vec<OsType>,
}
Expand description
An assignment represents the group or groups of VM instances that the policy applies to.
If an assignment is empty, it applies to all VM instances. Otherwise, the targeted VM instances must meet all the criteria specified. So if both labels and zones are specified, the policy applies to VM instances with those labels and in those zones.
Fields§
§group_labels: Vec<GroupLabel>
Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups, for example “env=prod or env=staging”.
zones: Vec<String>
Targets instances in any of these zones. Leave empty to target instances in any zone.
Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.
instances: Vec<String>
Targets any of the instances specified. Instances are specified by their
URI in the form zones/\[ZONE\]/instances/\[INSTANCE_NAME\]
.
Instance targeting is uncommon and is supported to facilitate the management of changes by the instance or to target specific VM instances for development and testing.
Only supported for project-level policies and must reference instances within this project.
instance_name_prefixes: Vec<String>
Targets VM instances whose name starts with one of these prefixes.
Like labels, this is another way to group VM instances when targeting configs, for example prefix=“prod-”.
Only supported for project-level policies.
os_types: Vec<OsType>
Targets VM instances matching at least one of the following OS types.
VM instances must match all supplied criteria for a given OsType to be included.
Trait Implementations§
source§impl Clone for Assignment
impl Clone for Assignment
source§fn clone(&self) -> Assignment
fn clone(&self) -> Assignment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Assignment
impl Debug for Assignment
source§impl Default for Assignment
impl Default for Assignment
source§impl Message for Assignment
impl Message for Assignment
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 Assignment
impl PartialEq for Assignment
source§fn eq(&self, other: &Assignment) -> bool
fn eq(&self, other: &Assignment) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Assignment
Auto Trait Implementations§
impl Freeze for Assignment
impl RefUnwindSafe for Assignment
impl Send for Assignment
impl Sync for Assignment
impl Unpin for Assignment
impl UnwindSafe for Assignment
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