Struct google_api_proto::google::cloud::binaryauthorization::v1::AdmissionRule
source · pub struct AdmissionRule {
pub evaluation_mode: i32,
pub require_attestations_by: Vec<String>,
pub enforcement_mode: i32,
}
Expand description
An [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images used in a pod creation request must be attested to by one or more [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all pod creations will be denied.
Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] are exempted from admission rules and will never block a pod creation.
Fields§
§evaluation_mode: i32
Required. How this admission rule will be evaluated.
require_attestations_by: Vec<String>
Optional. The resource names of the attestors that must attest to
a container image, in the format projects/*/attestors/*
. Each
attestor must exist before a policy can reference it. To add an attestor
to a policy the principal issuing the policy change request must be able
to read the attestor resource.
Note: this field must be non-empty when the evaluation_mode field specifies REQUIRE_ATTESTATION, otherwise it must be empty.
enforcement_mode: i32
Required. The action when a pod creation is denied by the admission rule.
Implementations§
source§impl AdmissionRule
impl AdmissionRule
sourcepub fn evaluation_mode(&self) -> EvaluationMode
pub fn evaluation_mode(&self) -> EvaluationMode
Returns the enum value of evaluation_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_evaluation_mode(&mut self, value: EvaluationMode)
pub fn set_evaluation_mode(&mut self, value: EvaluationMode)
Sets evaluation_mode
to the provided enum value.
sourcepub fn enforcement_mode(&self) -> EnforcementMode
pub fn enforcement_mode(&self) -> EnforcementMode
Returns the enum value of enforcement_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_enforcement_mode(&mut self, value: EnforcementMode)
pub fn set_enforcement_mode(&mut self, value: EnforcementMode)
Sets enforcement_mode
to the provided enum value.
Trait Implementations§
source§impl Clone for AdmissionRule
impl Clone for AdmissionRule
source§fn clone(&self) -> AdmissionRule
fn clone(&self) -> AdmissionRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AdmissionRule
impl Debug for AdmissionRule
source§impl Default for AdmissionRule
impl Default for AdmissionRule
source§impl Message for AdmissionRule
impl Message for AdmissionRule
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 AdmissionRule
impl PartialEq for AdmissionRule
source§fn eq(&self, other: &AdmissionRule) -> bool
fn eq(&self, other: &AdmissionRule) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AdmissionRule
Auto Trait Implementations§
impl Freeze for AdmissionRule
impl RefUnwindSafe for AdmissionRule
impl Send for AdmissionRule
impl Sync for AdmissionRule
impl Unpin for AdmissionRule
impl UnwindSafe for AdmissionRule
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