Interface HostPathVolumeOptions
- All Superinterfaces:
EksVolumeOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
HostPathVolumeOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-11T18:01:12.028Z")
@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
Modifier and TypeInterfaceDescriptionstatic final class
A builder forHostPathVolumeOptions
static final class
An 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, getReadonly
Methods 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.Builder
ofHostPathVolumeOptions
-