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 Summary
Modifier and TypeMethodDescriptionbuild()
containerPath
(String containerPath) the path on the container where this volume is mounted.static HostVolume.Builder
create()
The path on the host machine this container will have access to.the name of this volume.if set, the container will have readonly access to the volume.
-
Method Details
-
create
- Returns:
- a new instance of
HostVolume.Builder
.
-
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
the name of this volume.- Parameters:
name
- the name of this volume. This parameter is required.- Returns:
this
-
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HostVolume>
- Returns:
- a newly built instance of
HostVolume
.
-