Class HostPathVolume.Builder

java.lang.Object
software.amazon.awscdk.services.batch.HostPathVolume.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<HostPathVolume>
Enclosing class:
HostPathVolume

@Stability(Stable) public static final class HostPathVolume.Builder extends Object implements software.amazon.jsii.Builder<HostPathVolume>
A fluent builder for HostPathVolume.
  • Method Details

    • create

      @Stability(Stable) public static HostPathVolume.Builder create()
      Returns:
      a new instance of HostPathVolume.Builder.
    • name

      @Stability(Stable) public HostPathVolume.Builder name(String name)
      The name of this volume.

      The name must be a valid DNS subdomain name.

      Parameters:
      name - The name of this volume. This parameter is required.
      Returns:
      this
      See Also:
    • mountPath

      @Stability(Stable) public HostPathVolume.Builder mountPath(String mountPath)
      The path on the container where the volume is mounted.

      Default: - the volume is not mounted

      Parameters:
      mountPath - The path on the container where the volume is mounted. This parameter is required.
      Returns:
      this
    • readonly

      @Stability(Stable) public HostPathVolume.Builder readonly(Boolean readonly)
      If specified, the container has readonly access to the volume.

      Otherwise, the container has read/write access.

      Default: false

      Parameters:
      readonly - If specified, the container has readonly access to the volume. This parameter is required.
      Returns:
      this
    • hostPath

      @Stability(Stable) public HostPathVolume.Builder hostPath(String hostPath)
      The path of the file or directory on the host to mount into containers on the pod.

      Note: HothPath Volumes present many security risks, and should be avoided when possible.

      Parameters:
      hostPath - The path of the file or directory on the host to mount into containers on the pod. This parameter is required.
      Returns:
      this
      See Also:
    • build

      @Stability(Stable) public HostPathVolume build()
      Specified by:
      build in interface software.amazon.jsii.Builder<HostPathVolume>
      Returns:
      a newly built instance of HostPathVolume.