Package org.cdk8s.plus20
Class VolumeMount.Builder
- java.lang.Object
-
- org.cdk8s.plus20.VolumeMount.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<VolumeMount>
- Enclosing interface:
- VolumeMount
@Stability(Stable) public static final class VolumeMount.Builder extends Object implements software.amazon.jsii.Builder<VolumeMount>
A builder forVolumeMount
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VolumeMountbuild()Builds the configured instance.VolumeMount.Builderpath(String path)Sets the value ofVolumeMount.getPath()VolumeMount.Builderpropagation(MountPropagation propagation)Sets the value ofMountOptions.getPropagation()VolumeMount.BuilderreadOnly(Boolean readOnly)Sets the value ofMountOptions.getReadOnly()VolumeMount.BuildersubPath(String subPath)Sets the value ofMountOptions.getSubPath()VolumeMount.BuildersubPathExpr(String subPathExpr)Sets the value ofMountOptions.getSubPathExpr()VolumeMount.Buildervolume(Volume volume)Sets the value ofVolumeMount.getVolume()
-
-
-
Method Detail
-
path
@Stability(Stable) public VolumeMount.Builder path(String path)
Sets the value ofVolumeMount.getPath()- Parameters:
path- Path within the container at which the volume should be mounted. This parameter is required. Must not contain ':'.- Returns:
this
-
volume
@Stability(Stable) public VolumeMount.Builder volume(Volume volume)
Sets the value ofVolumeMount.getVolume()- Parameters:
volume- The volume to mount. This parameter is required.- Returns:
this
-
propagation
@Stability(Stable) public VolumeMount.Builder propagation(MountPropagation propagation)
Sets the value ofMountOptions.getPropagation()- Parameters:
propagation- Determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used.Mount propagation allows for sharing volumes mounted by a Container to other Containers in the same Pod, or even to other Pods on the same node.
This field is beta in 1.10.
- Returns:
this
-
readOnly
@Stability(Stable) public VolumeMount.Builder readOnly(Boolean readOnly)
Sets the value ofMountOptions.getReadOnly()- Parameters:
readOnly- Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.- Returns:
this
-
subPath
@Stability(Stable) public VolumeMount.Builder subPath(String subPath)
Sets the value ofMountOptions.getSubPath()- Parameters:
subPath- Path within the volume from which the container's volume should be mounted.).- Returns:
this
-
subPathExpr
@Stability(Stable) public VolumeMount.Builder subPathExpr(String subPathExpr)
Sets the value ofMountOptions.getSubPathExpr()- Parameters:
subPathExpr- Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is beta in 1.15.subPathExprandsubPathare mutually exclusive. This field is beta in 1.15.- Returns:
this
-
build
@Stability(Stable) public VolumeMount build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<VolumeMount>- Returns:
- a new instance of
VolumeMount - Throws:
NullPointerException- if any required attribute was not provided
-
-