Skip to content
v2.278.0

EksContainerVolumeMountProperty Struct ​

The volume mounts for a container for an Amazon EKS job.

For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const eksContainerVolumeMountProperty: batch.CfnJobDefinition.EksContainerVolumeMountProperty = {
  mountPath: 'mountPath',
  name: 'name',
  readOnly: false,
  subPath: 'subPath',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_batch as batch

eks_container_volume_mount_property = batch.CfnJobDefinition.EksContainerVolumeMountProperty(
    mount_path="mountPath",
    name="name",
    read_only=False,
    sub_path="subPath"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;

EksContainerVolumeMountProperty eksContainerVolumeMountProperty = EksContainerVolumeMountProperty.builder()
        .mountPath("mountPath")
        .name("name")
        .readOnly(false)
        .subPath("subPath")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;

var eksContainerVolumeMountProperty = new EksContainerVolumeMountProperty {
    MountPath = "mountPath",
    Name = "name",
    ReadOnly = false,
    SubPath = "subPath"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

eksContainerVolumeMountProperty := &EksContainerVolumeMountProperty{
	MountPath: jsii.String("mountPath"),
	Name: jsii.String("name"),
	ReadOnly: jsii.Boolean(false),
	SubPath: jsii.String("subPath"),
}

Properties ​

mountPathoptionalstringmount_pathoptionalstrmountPathoptionalStringMountPathoptionalstringMountPathoptional*string #
The path on the container where the volume is mounted.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
The name the volume mount.

This must match the name of one of the volumes in the pod.

readOnlyoptionalboolean | IResolvableread_onlyoptionaltyping.Union[bool, IResolvable]readOnlyoptionalBooleanReadOnlyoptionalboolReadOnlyoptionalinterface{} #
If this value is `true` , the container has read-only access to the volume.

Otherwise, the container can write to the volume. The default value is false .

subPathoptionalstringsub_pathoptionalstrsubPathoptionalStringSubPathoptionalstringSubPathoptional*string #
A sub-path inside the referenced volume instead of its root.