Class HostVolume.Builder

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

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

    • create

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

      @Stability(Stable) public HostVolume.Builder containerPath(String containerPath)
      the path on the container where this volume is mounted.

      Parameters:
      containerPath - the path on the container where this volume is mounted. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public HostVolume.Builder name(String name)
      the name of this volume.

      Parameters:
      name - the name of this volume. This parameter is required.
      Returns:
      this
    • readonly

      @Stability(Stable) public HostVolume.Builder readonly(Boolean readonly)
      if set, the container will have readonly access to the volume.

      Default: false

      Parameters:
      readonly - if set, the container will have readonly access to the volume. This parameter is required.
      Returns:
      this
    • hostPath

      @Stability(Stable) public HostVolume.Builder hostPath(String hostPath)
      The path on the host machine this container will have access to.

      Default: - Docker will choose the host path. The data may not persist after the containers that use it stop running.

      Parameters:
      hostPath - The path on the host machine this container will have access to. This parameter is required.
      Returns:
      this
    • build

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