Interface HostPathVolumeOptions
- All Superinterfaces:
EksVolumeOptions,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
HostPathVolumeOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:09:59.661Z")
@Stability(Stable)
public interface HostPathVolumeOptions
extends software.amazon.jsii.JsiiSerializable, EksVolumeOptions
Options for a kubernetes HostPath volume.
Example:
EksJobDefinition jobDefn;
jobDefn.container.addVolume(EksVolume.emptyDir(EmptyDirVolumeOptions.builder()
.name("emptyDir")
.mountPath("/Volumes/emptyDir")
.build()));
jobDefn.container.addVolume(EksVolume.hostPath(HostPathVolumeOptions.builder()
.name("hostPath")
.hostPath("/sys")
.mountPath("/Volumes/hostPath")
.build()));
jobDefn.container.addVolume(EksVolume.secret(SecretPathVolumeOptions.builder()
.name("secret")
.optional(true)
.mountPath("/Volumes/secret")
.secretName("mySecret")
.build()));
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forHostPathVolumeOptionsstatic final classAn implementation forHostPathVolumeOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()The path of the file or directory on the host to mount into containers on the pod.Methods inherited from interface software.amazon.awscdk.services.batch.EksVolumeOptions
getMountPath, getName, getReadonlyMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHostPath
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.
- See Also:
-
builder
- Returns:
- a
HostPathVolumeOptions.BuilderofHostPathVolumeOptions
-