Class 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 for PolicyRule
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • verbs

        @Stability(Stable)
        public PolicyRule.Builder verbs​(List<String> verbs)
        Sets the value of PolicyRule.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 of PolicyRule.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)
        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)
        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
      • build

        @Stability(Stable)
        public PolicyRule build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<PolicyRule>
        Returns:
        a new instance of PolicyRule
        Throws:
        NullPointerException - if any required attribute was not provided