Package org.cdk8s.plus24.k8s
Class PolicyRule.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.PolicyRule.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyRule>
- Enclosing interface:
- PolicyRule
@Stability(Stable) public static final class PolicyRule.Builder extends Object implements software.amazon.jsii.Builder<PolicyRule>
A builder forPolicyRule
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicyRule.Builder
apiGroups(List<String> apiGroups)
Sets the value ofPolicyRule.getApiGroups()
PolicyRule
build()
Builds the configured instance.PolicyRule.Builder
nonResourceUrLs(List<String> nonResourceUrLs)
Sets the value ofPolicyRule.getNonResourceUrLs()
PolicyRule.Builder
resourceNames(List<String> resourceNames)
Sets the value ofPolicyRule.getResourceNames()
PolicyRule.Builder
resources(List<String> resources)
Sets the value ofPolicyRule.getResources()
PolicyRule.Builder
verbs(List<String> verbs)
Sets the value ofPolicyRule.getVerbs()
-
-
-
Method Detail
-
verbs
@Stability(Stable) public PolicyRule.Builder verbs(List<String> verbs)
Sets the value ofPolicyRule.getVerbs()
- Parameters:
verbs
- Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. This parameter is required. '*' represents all verbs.- Returns:
this
-
apiGroups
@Stability(Stable) public PolicyRule.Builder apiGroups(List<String> apiGroups)
Sets the value ofPolicyRule.getApiGroups()
- Parameters:
apiGroups
- APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.- Returns:
this
-
nonResourceUrLs
@Stability(Stable) public PolicyRule.Builder nonResourceUrLs(List<String> nonResourceUrLs)
Sets the value ofPolicyRule.getNonResourceUrLs()
- Parameters:
nonResourceUrLs
- NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.- Returns:
this
-
resourceNames
@Stability(Stable) public PolicyRule.Builder resourceNames(List<String> resourceNames)
Sets the value ofPolicyRule.getResourceNames()
- Parameters:
resourceNames
- ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.- Returns:
this
-
resources
@Stability(Stable) public PolicyRule.Builder resources(List<String> resources)
Sets the value ofPolicyRule.getResources()
- Parameters:
resources
- Resources is a list of resources this rule applies to. '*' represents all resources.- Returns:
this
-
build
@Stability(Stable) public PolicyRule build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<PolicyRule>
- Returns:
- a new instance of
PolicyRule
- Throws:
NullPointerException
- if any required attribute was not provided
-
-