Package org.cdk8s.plus24.k8s
Class SecretProjection.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.SecretProjection.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<SecretProjection>
- Enclosing interface:
- SecretProjection
@Stability(Stable) public static final class SecretProjection.Builder extends Object implements software.amazon.jsii.Builder<SecretProjection>
A builder forSecretProjection
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecretProjection
build()
Builds the configured instance.SecretProjection.Builder
items(List<? extends KeyToPath> items)
Sets the value ofSecretProjection.getItems()
SecretProjection.Builder
name(String name)
Sets the value ofSecretProjection.getName()
SecretProjection.Builder
optional(Boolean optional)
Sets the value ofSecretProjection.getOptional()
-
-
-
Method Detail
-
items
@Stability(Stable) public SecretProjection.Builder items(List<? extends KeyToPath> items)
Sets the value ofSecretProjection.getItems()
- Parameters:
items
- items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.- Returns:
this
-
name
@Stability(Stable) public SecretProjection.Builder name(String name)
Sets the value ofSecretProjection.getName()
- Parameters:
name
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names- Returns:
this
-
optional
@Stability(Stable) public SecretProjection.Builder optional(Boolean optional)
Sets the value ofSecretProjection.getOptional()
- Parameters:
optional
- optional field specify whether the Secret or its key must be defined.- Returns:
this
-
build
@Stability(Stable) public SecretProjection build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SecretProjection>
- Returns:
- a new instance of
SecretProjection
- Throws:
NullPointerException
- if any required attribute was not provided
-
-