Package org.cdk8s.plus23.k8s
Class TokenRequest.Builder
- java.lang.Object
-
- org.cdk8s.plus23.k8s.TokenRequest.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TokenRequest>
- Enclosing interface:
- TokenRequest
@Stability(Stable) public static final class TokenRequest.Builder extends Object implements software.amazon.jsii.Builder<TokenRequest>
A builder forTokenRequest
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenRequest.Builder
audience(String audience)
Sets the value ofTokenRequest.getAudience()
TokenRequest
build()
Builds the configured instance.TokenRequest.Builder
expirationSeconds(Number expirationSeconds)
Sets the value ofTokenRequest.getExpirationSeconds()
-
-
-
Method Detail
-
audience
@Stability(Stable) public TokenRequest.Builder audience(String audience)
Sets the value ofTokenRequest.getAudience()
- Parameters:
audience
- Audience is the intended audience of the token in "TokenRequestSpec". This parameter is required. It will default to the audiences of kube apiserver.- Returns:
this
-
expirationSeconds
@Stability(Stable) public TokenRequest.Builder expirationSeconds(Number expirationSeconds)
Sets the value ofTokenRequest.getExpirationSeconds()
- Parameters:
expirationSeconds
- ExpirationSeconds is the duration of validity of the token in "TokenRequestSpec". It has the same default value of "ExpirationSeconds" in "TokenRequestSpec".- Returns:
this
-
build
@Stability(Stable) public TokenRequest build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TokenRequest>
- Returns:
- a new instance of
TokenRequest
- Throws:
NullPointerException
- if any required attribute was not provided
-
-