class Google::Apis::BinaryauthorizationV1::AdmissionRule
An admission rule specifies either that all container images used in a pod creation request must be attested to by one or more attestors, that all pod creations will be allowed, or that all pod creations will be denied. Images matching an admission allowlist pattern are exempted from admission rules and will never block a pod creation.
Attributes
Required. The action when a pod creation is denied by the admission rule. Corresponds to the JSON property `enforcementMode` @return [String]
Required. How this admission rule will be evaluated. Corresponds to the JSON property `evaluationMode` @return [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. Corresponds to the JSON property `requireAttestationsBy` @return [Array<String>]
Public Class Methods
# File lib/google/apis/binaryauthorization_v1/classes.rb, line 53 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/binaryauthorization_v1/classes.rb, line 58 def update!(**args) @enforcement_mode = args[:enforcement_mode] if args.key?(:enforcement_mode) @evaluation_mode = args[:evaluation_mode] if args.key?(:evaluation_mode) @require_attestations_by = args[:require_attestations_by] if args.key?(:require_attestations_by) end