Package org.cdk8s.plus24.k8s
Class Subject.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.Subject.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subject.Builder
apiGroup(String apiGroup)
Sets the value ofSubject.getApiGroup()
Subject
build()
Builds the configured instance.Subject.Builder
kind(String kind)
Sets the value ofSubject.getKind()
Subject.Builder
name(String name)
Sets the value ofSubject.getName()
Subject.Builder
namespace(String namespace)
Sets the value ofSubject.getNamespace()
-
-
-
Method Detail
-
kind
@Stability(Stable) public Subject.Builder kind(String kind)
Sets the value ofSubject.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 ofSubject.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 ofSubject.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 ofSubject.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 interfacesoftware.amazon.jsii.Builder<Subject>
- Returns:
- a new instance of
Subject
- Throws:
NullPointerException
- if any required attribute was not provided
-
-