# Tmpfs

The details of a tmpfs mount for a container.

Used as argument in: [LinuxParameters.addTmpfs](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.LinuxParameters.html#addtmpfs)

- Source: [`aws-batch/lib/linux-parameters.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-batch/lib/linux-parameters.ts#L190)
- Type last changed: v2.96.0 · 13 Sep 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_batch as batch } from 'aws-cdk-lib';

declare const size: cdk.Size;
const tmpfs: batch.Tmpfs = {
  containerPath: 'containerPath',
  size: size,

  // the properties below are optional
  mountOptions: [batch.TmpfsMountOption.DEFAULTS],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_batch as batch

# size: cdk.Size

tmpfs = batch.Tmpfs(
    container_path="containerPath",
    size=size,

    # the properties below are optional
    mount_options=[batch.TmpfsMountOption.DEFAULTS]
)
```

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.*;
import software.amazon.awscdk.services.batch.*;

Size size;

Tmpfs tmpfs = Tmpfs.builder()
        .containerPath("containerPath")
        .size(size)

        // the properties below are optional
        .mountOptions(List.of(TmpfsMountOption.DEFAULTS))
        .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;
using Amazon.CDK.AWS.Batch;

Size size;

var tmpfs = new Tmpfs {
    ContainerPath = "containerPath",
    Size = size,

    // the properties below are optional
    MountOptions = new [] { TmpfsMountOption.DEFAULTS }
};
```

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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var size Size

tmpfs := &Tmpfs{
	ContainerPath: jsii.String("containerPath"),
	Size: size,

	// the properties below are optional
	MountOptions: []TmpfsMountOption{
		awscdk.Aws_batch.TmpfsMountOption_DEFAULTS,
	},
}
```

## Properties

- `containerPath`: string (required) — The absolute file path where the tmpfs volume is to be mounted.

- `mountOptions`: [TmpfsMountOption](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.TmpfsMountOption.html)[] = none — The list of tmpfs volume mount options.

  For more information, see
  [TmpfsMountOptions](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Tmpfs.html).

- `size`: [Size](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Size.html) (required) — The size (in MiB) of the tmpfs volume.
