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 Summary
Modifier and TypeMethodDescriptionbuild()
static HostPathVolume.Builder
create()
The path of the file or directory on the host to mount into containers on the pod.The path on the container where the volume is mounted.The name of this volume.If specified, the container has readonly access to the volume.
-
Method Details
-
create
- Returns:
- a new instance of
HostPathVolume.Builder
.
-
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
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
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HostPathVolume>
- Returns:
- a newly built instance of
HostPathVolume
.
-