Package org.cdk8s.plus24.k8s
Class ServiceAccountTokenProjection.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.ServiceAccountTokenProjection.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServiceAccountTokenProjection>
- Enclosing interface:
- ServiceAccountTokenProjection
@Stability(Stable) public static final class ServiceAccountTokenProjection.Builder extends Object implements software.amazon.jsii.Builder<ServiceAccountTokenProjection>
A builder forServiceAccountTokenProjection
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceAccountTokenProjection.Builder
audience(String audience)
Sets the value ofServiceAccountTokenProjection.getAudience()
ServiceAccountTokenProjection
build()
Builds the configured instance.ServiceAccountTokenProjection.Builder
expirationSeconds(Number expirationSeconds)
Sets the value ofServiceAccountTokenProjection.getExpirationSeconds()
ServiceAccountTokenProjection.Builder
path(String path)
Sets the value ofServiceAccountTokenProjection.getPath()
-
-
-
Method Detail
-
path
@Stability(Stable) public ServiceAccountTokenProjection.Builder path(String path)
Sets the value ofServiceAccountTokenProjection.getPath()
- Parameters:
path
- path is the path relative to the mount point of the file to project the token into. This parameter is required.- Returns:
this
-
audience
@Stability(Stable) public ServiceAccountTokenProjection.Builder audience(String audience)
Sets the value ofServiceAccountTokenProjection.getAudience()
- Parameters:
audience
- audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.- Returns:
this
-
expirationSeconds
@Stability(Stable) public ServiceAccountTokenProjection.Builder expirationSeconds(Number expirationSeconds)
Sets the value ofServiceAccountTokenProjection.getExpirationSeconds()
- Parameters:
expirationSeconds
- expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.- Returns:
this
-
build
@Stability(Stable) public ServiceAccountTokenProjection build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServiceAccountTokenProjection>
- Returns:
- a new instance of
ServiceAccountTokenProjection
- Throws:
NullPointerException
- if any required attribute was not provided
-
-