Class EksVolume
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.batch.EksVolume
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
EmptyDirVolume,HostPathVolume,SecretPathVolume
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:09:59.644Z")
@Stability(Stable)
public abstract class EksVolume
extends software.amazon.jsii.JsiiObject
A Volume that can be mounted to a container supported by EKS.
Example:
EksJobDefinition jobDefn = EksJobDefinition.Builder.create(this, "eksf2")
.container(EksContainerDefinition.Builder.create(this, "container")
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.volumes(List.of(EksVolume.emptyDir(EmptyDirVolumeOptions.builder()
.name("myEmptyDirVolume")
.mountPath("/mount/path")
.medium(EmptyDirMediumType.MEMORY)
.readonly(true)
.sizeLimit(Size.mebibytes(2048))
.build())))
.build())
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEksVolume(EksVolumeOptions options) protectedEksVolume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEksVolume(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic EmptyDirVolumeemptyDir(EmptyDirVolumeOptions options) Creates a Kubernetes EmptyDir volume.The path on the container where the container is mounted.getName()The name of this volume.If specified, the container has readonly access to the volume.static HostPathVolumehostPath(HostPathVolumeOptions options) Creates a Kubernetes HostPath volume.static SecretPathVolumesecret(SecretPathVolumeOptions options) Creates a Kubernetes Secret volume.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
EksVolume
protected EksVolume(software.amazon.jsii.JsiiObjectRef objRef) -
EksVolume
protected EksVolume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
EksVolume
- Parameters:
options- This parameter is required.
-
-
Method Details
-
emptyDir
@Stability(Stable) @NotNull public static EmptyDirVolume emptyDir(@NotNull EmptyDirVolumeOptions options) Creates a Kubernetes EmptyDir volume.- Parameters:
options- This parameter is required.- See Also:
-
hostPath
@Stability(Stable) @NotNull public static HostPathVolume hostPath(@NotNull HostPathVolumeOptions options) Creates a Kubernetes HostPath volume.- Parameters:
options- This parameter is required.- See Also:
-
secret
@Stability(Stable) @NotNull public static SecretPathVolume secret(@NotNull SecretPathVolumeOptions options) Creates a Kubernetes Secret volume.- Parameters:
options- This parameter is required.- See Also:
-
getName
The name of this volume.The name must be a valid DNS subdomain name.
- See Also:
-
getContainerPath
The path on the container where the container is mounted.Default: - the container is not mounted
-
getReadonly
If specified, the container has readonly access to the volume.Otherwise, the container has read/write access.
Default: false
-