[][src]Struct gcp_client::google::cloud::binaryauthorization::v1beta1::AdmissionRule

pub struct AdmissionRule {
    pub evaluation_mode: i32,
    pub require_attestations_by: Vec<String>,
    pub enforcement_mode: i32,
}

An [admission rule][google.cloud.binaryauthorization.v1beta1.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.v1beta1.Attestor], that all pod creations will be allowed, or that all pod creations will be denied.

Images matching an [admission whitelist pattern][google.cloud.binaryauthorization.v1beta1.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

impl AdmissionRule[src]

pub fn evaluation_mode(&self) -> EvaluationMode[src]

Returns the enum value of evaluation_mode, or the default if the field is set to an invalid enum value.

pub fn set_evaluation_mode(&mut self, value: EvaluationMode)[src]

Sets evaluation_mode to the provided enum value.

pub fn enforcement_mode(&self) -> EnforcementMode[src]

Returns the enum value of enforcement_mode, or the default if the field is set to an invalid enum value.

pub fn set_enforcement_mode(&mut self, value: EnforcementMode)[src]

Sets enforcement_mode to the provided enum value.

Trait Implementations

impl Clone for AdmissionRule[src]

impl Debug for AdmissionRule[src]

impl Default for AdmissionRule[src]

impl Message for AdmissionRule[src]

impl PartialEq<AdmissionRule> for AdmissionRule[src]

impl StructuralPartialEq for AdmissionRule[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]