Package org.cdk8s.plus24.k8s
Class RuleWithOperations.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.RuleWithOperations.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<RuleWithOperations>
- Enclosing interface:
- RuleWithOperations
@Stability(Stable) public static final class RuleWithOperations.Builder extends Object implements software.amazon.jsii.Builder<RuleWithOperations>
A builder forRuleWithOperations
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleWithOperations.Builder
apiGroups(List<String> apiGroups)
Sets the value ofRuleWithOperations.getApiGroups()
RuleWithOperations.Builder
apiVersions(List<String> apiVersions)
Sets the value ofRuleWithOperations.getApiVersions()
RuleWithOperations
build()
Builds the configured instance.RuleWithOperations.Builder
operations(List<String> operations)
Sets the value ofRuleWithOperations.getOperations()
RuleWithOperations.Builder
resources(List<String> resources)
Sets the value ofRuleWithOperations.getResources()
RuleWithOperations.Builder
scope(String scope)
Sets the value ofRuleWithOperations.getScope()
-
-
-
Method Detail
-
apiGroups
@Stability(Stable) public RuleWithOperations.Builder apiGroups(List<String> apiGroups)
Sets the value ofRuleWithOperations.getApiGroups()
- Parameters:
apiGroups
- APIGroups is the API groups the resources belong to. '' is all groups. If '' is present, the length of the slice must be one. Required.- Returns:
this
-
apiVersions
@Stability(Stable) public RuleWithOperations.Builder apiVersions(List<String> apiVersions)
Sets the value ofRuleWithOperations.getApiVersions()
- Parameters:
apiVersions
- APIVersions is the API versions the resources belong to. '' is all versions. If '' is present, the length of the slice must be one. Required.- Returns:
this
-
operations
@Stability(Stable) public RuleWithOperations.Builder operations(List<String> operations)
Sets the value ofRuleWithOperations.getOperations()
- Parameters:
operations
- Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.- Returns:
this
-
resources
@Stability(Stable) public RuleWithOperations.Builder resources(List<String> resources)
Sets the value ofRuleWithOperations.getResources()
- Parameters:
resources
- Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '' means all resources, but not subresources. 'pods/' means all subresources of pods. '/scale' means all scale subresources. '/*' means all resources and their subresources.If wildcard is present, the validation rule will ensure resources do not overlap with each other.
Depending on the enclosing object, subresources might not be allowed. Required.
- Returns:
this
-
scope
@Stability(Stable) public RuleWithOperations.Builder scope(String scope)
Sets the value ofRuleWithOperations.getScope()
- Parameters:
scope
- scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*".- Returns:
this
-
build
@Stability(Stable) public RuleWithOperations build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RuleWithOperations>
- Returns:
- a new instance of
RuleWithOperations
- Throws:
NullPointerException
- if any required attribute was not provided
-
-