#[non_exhaustive]pub struct PatchInstanceFilter {
pub all: bool,
pub group_labels: Vec<GroupLabel>,
pub zones: Vec<String>,
pub instances: Vec<String>,
pub instance_name_prefixes: Vec<String>,
/* private fields */
}Expand description
A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.all: boolTarget all VM instances in the project. If true, no other criteria is permitted.
group_labels: Vec<GroupLabel>Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
zones: Vec<String>Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
instances: Vec<String>Targets any of the VM instances specified. Instances are specified by their
URI in the form zones/[ZONE]/instances/[INSTANCE_NAME],
projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or
<https://www.googleapis.com/compute/v1/projects/>[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]
instance_name_prefixes: Vec<String>Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=“prod-”.
Implementations§
Source§impl PatchInstanceFilter
impl PatchInstanceFilter
Sourcepub fn set_group_labels<T, V>(self, v: T) -> Self
pub fn set_group_labels<T, V>(self, v: T) -> Self
Sets the value of group_labels.
§Example
use google_cloud_osconfig_v1::model::patch_instance_filter::GroupLabel;
let x = PatchInstanceFilter::new()
.set_group_labels([
GroupLabel::default()/* use setters */,
GroupLabel::default()/* use (different) setters */,
]);Sourcepub fn set_instances<T, V>(self, v: T) -> Self
pub fn set_instances<T, V>(self, v: T) -> Self
Sourcepub fn set_instance_name_prefixes<T, V>(self, v: T) -> Self
pub fn set_instance_name_prefixes<T, V>(self, v: T) -> Self
Sets the value of instance_name_prefixes.
§Example
let x = PatchInstanceFilter::new().set_instance_name_prefixes(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for PatchInstanceFilter
impl Clone for PatchInstanceFilter
Source§fn clone(&self) -> PatchInstanceFilter
fn clone(&self) -> PatchInstanceFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PatchInstanceFilter
impl Debug for PatchInstanceFilter
Source§impl Default for PatchInstanceFilter
impl Default for PatchInstanceFilter
Source§fn default() -> PatchInstanceFilter
fn default() -> PatchInstanceFilter
Source§impl Message for PatchInstanceFilter
impl Message for PatchInstanceFilter
Source§impl PartialEq for PatchInstanceFilter
impl PartialEq for PatchInstanceFilter
impl StructuralPartialEq for PatchInstanceFilter
Auto Trait Implementations§
impl Freeze for PatchInstanceFilter
impl RefUnwindSafe for PatchInstanceFilter
impl Send for PatchInstanceFilter
impl Sync for PatchInstanceFilter
impl Unpin for PatchInstanceFilter
impl UnsafeUnpin for PatchInstanceFilter
impl UnwindSafe for PatchInstanceFilter
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<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>
T in a tonic::Request