Class EmptyDirVolumeOptions
Options for a Kubernetes EmptyDir volume.
Inheritance
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EmptyDirVolumeOptions : Object, IEmptyDirVolumeOptions, IEksVolumeOptions
Syntax (vb)
Public Class EmptyDirVolumeOptions
Inherits Object
Implements IEmptyDirVolumeOptions, IEksVolumeOptions
Remarks
See: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
ExampleMetadata: infused
Examples
var jobDefn = new EksJobDefinition(this, "eksf2", new EksJobDefinitionProps {
Container = new EksContainerDefinition(this, "container", new EksContainerDefinitionProps {
Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample"),
Volumes = new [] { EksVolume.EmptyDir(new EmptyDirVolumeOptions {
Name = "myEmptyDirVolume",
MountPath = "/mount/path",
Medium = EmptyDirMediumType.MEMORY,
Readonly = true,
SizeLimit = Size.Mebibytes(2048)
}) }
})
});
Synopsis
Constructors
EmptyDirVolumeOptions() |
Properties
Medium | The storage type to use for this Volume. |
MountPath | The path on the container where the volume is mounted. |
Name | The name of this volume. |
Readonly | If specified, the container has readonly access to the volume. |
SizeLimit | The maximum size for this Volume. |
Constructors
EmptyDirVolumeOptions()
public EmptyDirVolumeOptions()
Properties
Medium
The storage type to use for this Volume.
public Nullable<EmptyDirMediumType> Medium { get; set; }
Property Value
System.Nullable<EmptyDirMediumType>
Remarks
Default: EmptyDirMediumType.DISK
MountPath
The path on the container where the volume is mounted.
public string MountPath { get; set; }
Property Value
System.String
Remarks
Default: - the volume is not mounted
Name
The name of this volume.
public string Name { get; set; }
Property Value
System.String
Remarks
The name must be a valid DNS subdomain name.
See: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
Readonly
If specified, the container has readonly access to the volume.
public Nullable<bool> Readonly { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Otherwise, the container has read/write access.
Default: false
SizeLimit
The maximum size for this Volume.
public Size SizeLimit { get; set; }
Property Value
Remarks
Default: - no size limit