Package org.cdk8s.plus24
Class MountOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus24.MountOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<MountOptions>
- Enclosing interface:
- MountOptions
@Stability(Stable) public static final class MountOptions.Builder extends Object implements software.amazon.jsii.Builder<MountOptions>
A builder forMountOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MountOptionsbuild()Builds the configured instance.MountOptions.Builderpropagation(MountPropagation propagation)Sets the value ofMountOptions.getPropagation()MountOptions.BuilderreadOnly(Boolean readOnly)Sets the value ofMountOptions.getReadOnly()MountOptions.BuildersubPath(String subPath)Sets the value ofMountOptions.getSubPath()MountOptions.BuildersubPathExpr(String subPathExpr)Sets the value ofMountOptions.getSubPathExpr()
-
-
-
Method Detail
-
propagation
@Stability(Stable) public MountOptions.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.
- Returns:
this
-
readOnly
@Stability(Stable) public MountOptions.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 MountOptions.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 MountOptions.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).subPathExprandsubPathare mutually exclusive.- Returns:
this
-
build
@Stability(Stable) public MountOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MountOptions>- Returns:
- a new instance of
MountOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-