# EksContainerVolumeMountProperty

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

For more information about volumes and volume mounts in Kubernetes, see [Volumes](https://docs.aws.amazon.com/https://kubernetes.io/docs/concepts/storage/volumes/) in the *Kubernetes documentation* .

- Source: Generated at build time
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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

- `mountPath`: string — The path on the container where the volume is mounted.

- `name`: string — The name the volume mount.

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

- `readOnly`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — 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` .

- `subPath`: string — A sub-path inside the referenced volume instead of its root.
