# CapsuleVersion

A version of a capsule: the packages, users, mounts and startup commands a run starts with, and how long it may last.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `template` | `string` | The base image name recorded with the capsule (`template`). Every capsule runs on the same image, so it does not change what runs. |
| `additionalPackages` | `string[]` | Extra Debian packages installed with `apt` when a run starts. |
| `users` | [`CapsuleUserDefinition`](https://docs.maitento.com/reference/types/capsule-user-definition.md)`[]` | Linux users created when a run starts. |
| `virtualFileSystemMounts` | [`CapsuleVirtualFileSystemMount`](https://docs.maitento.com/reference/types/capsule-virtual-file-system-mount.md)`[]` | Virtual file systems mounted when a run starts, unless the start request replaces them. |
| `secretMounts` | [`CapsuleSecretMount`](https://docs.maitento.com/reference/types/capsule-secret-mount.md)`[]` | Secrets mounted when a run starts, unless the start request replaces them. |
| `startupCommands` | [`CapsuleStartupCommand`](https://docs.maitento.com/reference/types/capsule-startup-command.md)`[]` | Commands run, in order, when a run starts. |
| `autoTerminateAfterStartupCommands` | `boolean` | Whether a run finishes as soon as its startup commands (and any commands sent with the start) are done. |
| `maximumDuration` | `timespan \| null` | The longest a run may last (`maxDuration`), counted from when it starts; null means ten minutes. A run still starting up then fails; a ready one finishes, and a command it is still running or has queued ends `AbortedOnTermination`. |
| `version` | `integer` | The version number, from 1. Every change to a definition adds a new version with the next number. |
| `date` | `datetime` | When this version was created, in UTC. |
| `isDisabled` | `boolean` | Whether this version is disabled. A disabled version is never used: new links and runs take the latest enabled version, and anything pinned to this one fails until it is re-enabled. |

## Example

```json
{
  "template": "...",
  "additionalPackages": [
    "..."
  ],
  "users": [
    {
      "name": "...",
      "sudoAsUsers": []
    }
  ],
  "virtualFileSystemMounts": [
    {
      "vfsId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "vfsNamespaceId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "mountName": "..."
    }
  ],
  "secretMounts": [
    {
      "secretName": "...",
      "mountName": "..."
    }
  ],
  "startupCommands": [
    {
      "command": "...",
      "arguments": [],
      "runAsUser": "...",
      "maximumDuration": "00:05:00",
      "waitToComplete": false
    }
  ],
  "autoTerminateAfterStartupCommands": false,
  "maximumDuration": "00:05:00",
  "version": 0,
  "date": "2026-10-26T12:00:00.0000000Z",
  "isDisabled": false
}
```

## Where it's used

- Inside [`Capsule`](https://docs.maitento.com/reference/types/capsule.md)
