Class Subject.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Subject>
    Enclosing interface:
    Subject

    @Stability(Stable)
    public static final class Subject.Builder
    extends Object
    implements software.amazon.jsii.Builder<Subject>
    A builder for Subject
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • kind

        @Stability(Stable)
        public Subject.Builder kind​(String kind)
        Sets the value of Subject.getKind()
        Parameters:
        kind - Kind of object being referenced. This parameter is required. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
        Returns:
        this
      • name

        @Stability(Stable)
        public Subject.Builder name​(String name)
        Sets the value of Subject.getName()
        Parameters:
        name - Name of the object being referenced. This parameter is required.
        Returns:
        this
      • apiGroup

        @Stability(Stable)
        public Subject.Builder apiGroup​(String apiGroup)
        Sets the value of Subject.getApiGroup()
        Parameters:
        apiGroup - APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
        Returns:
        this
      • namespace

        @Stability(Stable)
        public Subject.Builder namespace​(String namespace)
        Sets the value of Subject.getNamespace()
        Parameters:
        namespace - Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
        Returns:
        this
      • build

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