Class 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 for VolumeMount
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • mountPath

        @Stability(Stable)
        public VolumeMount.Builder mountPath​(String mountPath)
        Sets the value of VolumeMount.getMountPath()
        Parameters:
        mountPath - Path within the container at which the volume should be mounted. This parameter is required. Must not contain ':'.
        Returns:
        this
      • mountPropagation

        @Stability(Stable)
        public VolumeMount.Builder mountPropagation​(String mountPropagation)
        Parameters:
        mountPropagation - mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
        Returns:
        this
      • readOnly

        @Stability(Stable)
        public VolumeMount.Builder readOnly​(Boolean readOnly)
        Sets the value of VolumeMount.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 of VolumeMount.getSubPath()
        Parameters:
        subPath - Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
        Returns:
        this
      • subPathExpr

        @Stability(Stable)
        public VolumeMount.Builder subPathExpr​(String subPathExpr)
        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.
        Returns:
        this
      • build

        @Stability(Stable)
        public VolumeMount build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<VolumeMount>
        Returns:
        a new instance of VolumeMount
        Throws:
        NullPointerException - if any required attribute was not provided