Package org.cdk8s.plus24.k8s
Class ConfigMapVolumeSource.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.ConfigMapVolumeSource.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ConfigMapVolumeSource>
- Enclosing interface:
- ConfigMapVolumeSource
@Stability(Stable) public static final class ConfigMapVolumeSource.Builder extends Object implements software.amazon.jsii.Builder<ConfigMapVolumeSource>
A builder forConfigMapVolumeSource
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigMapVolumeSource
build()
Builds the configured instance.ConfigMapVolumeSource.Builder
defaultMode(Number defaultMode)
Sets the value ofConfigMapVolumeSource.getDefaultMode()
ConfigMapVolumeSource.Builder
items(List<? extends KeyToPath> items)
Sets the value ofConfigMapVolumeSource.getItems()
ConfigMapVolumeSource.Builder
name(String name)
Sets the value ofConfigMapVolumeSource.getName()
ConfigMapVolumeSource.Builder
optional(Boolean optional)
Sets the value ofConfigMapVolumeSource.getOptional()
-
-
-
Method Detail
-
defaultMode
@Stability(Stable) public ConfigMapVolumeSource.Builder defaultMode(Number defaultMode)
Sets the value ofConfigMapVolumeSource.getDefaultMode()
- Parameters:
defaultMode
- defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.- Returns:
this
-
items
@Stability(Stable) public ConfigMapVolumeSource.Builder items(List<? extends KeyToPath> items)
Sets the value ofConfigMapVolumeSource.getItems()
- Parameters:
items
- items if unspecified, each key-value pair in the Data field of the referenced ConfigMap 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 ConfigMap, 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 ConfigMapVolumeSource.Builder name(String name)
Sets the value ofConfigMapVolumeSource.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 ConfigMapVolumeSource.Builder optional(Boolean optional)
Sets the value ofConfigMapVolumeSource.getOptional()
- Parameters:
optional
- optional specify whether the ConfigMap or its keys must be defined.- Returns:
this
-
build
@Stability(Stable) public ConfigMapVolumeSource build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ConfigMapVolumeSource>
- Returns:
- a new instance of
ConfigMapVolumeSource
- Throws:
NullPointerException
- if any required attribute was not provided
-
-