Class MatchCondition.Builder
- java.lang.Object
-
- org.cdk8s.plus28.k8s.MatchCondition.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<MatchCondition>
- Enclosing interface:
- MatchCondition
@Stability(Stable) public static final class MatchCondition.Builder extends Object implements software.amazon.jsii.Builder<MatchCondition>
A builder forMatchCondition
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchConditionbuild()Builds the configured instance.MatchCondition.Builderexpression(String expression)Sets the value ofMatchCondition.getExpression()MatchCondition.Buildername(String name)Sets the value ofMatchCondition.getName()
-
-
-
Method Detail
-
expression
@Stability(Stable) public MatchCondition.Builder expression(String expression)
Sets the value ofMatchCondition.getExpression()- Parameters:
expression- Expression represents the expression which will be evaluated by CEL. This parameter is required. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
- Returns:
this
-
name
@Stability(Stable) public MatchCondition.Builder name(String name)
Sets the value ofMatchCondition.getName()- Parameters:
name- Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. This parameter is required. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')Required.
- Returns:
this
-
build
@Stability(Stable) public MatchCondition build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MatchCondition>- Returns:
- a new instance of
MatchCondition - Throws:
NullPointerException- if any required attribute was not provided
-
-