Search or ask Docker

Volume

Volume schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

ClusterVolume

Schema: ClusterVolume

CreatedAt

Type: string

Date/Time the volume was created.
All schema constraints and annotations
{
  "description": "Date/Time the volume was created.",
  "example": "2016-06-07T20:31:11.853781916Z",
  "format": "dateTime",
  "type": "string"
}
Driver · required

Type: string

Name of the volume driver used by the volume.
All schema constraints and annotations
{
  "description": "Name of the volume driver used by the volume.",
  "example": "custom",
  "type": "string",
  "x-nullable": false
}
Labels · required

Type: object

User-defined key/value metadata.
All schema constraints and annotations
{
  "additionalProperties": {
    "type": "string"
  },
  "description": "User-defined key/value metadata.",
  "example": {
    "com.example.some-label": "some-value",
    "com.example.some-other-label": "some-other-value"
  },
  "type": "object",
  "x-nullable": false
}
Mountpoint · required

Type: string

Mount path of the volume on the host.
All schema constraints and annotations
{
  "description": "Mount path of the volume on the host.",
  "example": "/var/lib/docker/volumes/tardis",
  "type": "string",
  "x-nullable": false
}
Name · required

Type: string

Name of the volume.
All schema constraints and annotations
{
  "description": "Name of the volume.",
  "example": "tardis",
  "type": "string",
  "x-nullable": false
}
Options · required

Type: object

The driver specific options used when creating the volume.
All schema constraints and annotations
{
  "additionalProperties": {
    "type": "string"
  },
  "description": "The driver specific options used when creating the volume.\n",
  "example": {
    "device": "tmpfs",
    "o": "size=100m,uid=1000",
    "type": "tmpfs"
  },
  "type": "object"
}
Scope · required

Type: string

The level at which the volume exists. Either global for cluster-wide, or local for machine level.
All schema constraints and annotations
{
  "default": "local",
  "description": "The level at which the volume exists. Either `global` for cluster-wide,\nor `local` for machine level.\n",
  "enum": [
    "local",
    "global"
  ],
  "example": "local",
  "type": "string",
  "x-nullable": false
}
Status

Type: object

Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: {"key":"value","key2":"value2"}.

The Status field is optional, and is omitted if the volume driver does not support this feature.

All schema constraints and annotations
{
  "additionalProperties": {
    "type": "object"
  },
  "description": "Low-level details about the volume, provided by the volume driver.\nDetails are returned as a map with key/value pairs:\n`{\"key\":\"value\",\"key2\":\"value2\"}`.\n\nThe `Status` field is optional, and is omitted if the volume driver\ndoes not support this feature.\n",
  "example": {
    "hello": "world"
  },
  "type": "object"
}
UsageData

Type: object

Usage details about the volume. This information is used by the GET /system/df endpoint, and omitted in other endpoints.
RefCount · required

Type: integer

The number of containers referencing this volume. This field is set to -1 if the reference-count is not available.
All schema constraints and annotations
{
  "default": -1,
  "description": "The number of containers referencing this volume. This field\nis set to `-1` if the reference-count is not available.\n",
  "format": "int64",
  "type": "integer",
  "x-nullable": false
}
Size · required

Type: integer

Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the "local" volume driver. For volumes created with other volume drivers, this field is set to -1 ("not available")
All schema constraints and annotations
{
  "default": -1,
  "description": "Amount of disk space used by the volume (in bytes). This information\nis only available for volumes created with the `\"local\"` volume\ndriver. For volumes created with other volume drivers, this field\nis set to `-1` (\"not available\")\n",
  "format": "int64",
  "type": "integer",
  "x-nullable": false
}
All schema constraints and annotations
{
  "description": "Usage details about the volume. This information is used by the\n`GET /system/df` endpoint, and omitted in other endpoints.\n",
  "properties": {
    "RefCount": {
      "default": -1,
      "description": "The number of containers referencing this volume. This field\nis set to `-1` if the reference-count is not available.\n",
      "format": "int64",
      "type": "integer",
      "x-nullable": false
    },
    "Size": {
      "default": -1,
      "description": "Amount of disk space used by the volume (in bytes). This information\nis only available for volumes created with the `\"local\"` volume\ndriver. For volumes created with other volume drivers, this field\nis set to `-1` (\"not available\")\n",
      "format": "int64",
      "type": "integer",
      "x-nullable": false
    }
  },
  "required": [
    "Size",
    "RefCount"
  ],
  "type": "object",
  "x-go-name": "UsageData",
  "x-nullable": true
}
All schema constraints and annotations
{
  "properties": {
    "ClusterVolume": {
      "$ref": "#/components/schemas/ClusterVolume"
    },
    "CreatedAt": {
      "description": "Date/Time the volume was created.",
      "example": "2016-06-07T20:31:11.853781916Z",
      "format": "dateTime",
      "type": "string"
    },
    "Driver": {
      "description": "Name of the volume driver used by the volume.",
      "example": "custom",
      "type": "string",
      "x-nullable": false
    },
    "Labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined key/value metadata.",
      "example": {
        "com.example.some-label": "some-value",
        "com.example.some-other-label": "some-other-value"
      },
      "type": "object",
      "x-nullable": false
    },
    "Mountpoint": {
      "description": "Mount path of the volume on the host.",
      "example": "/var/lib/docker/volumes/tardis",
      "type": "string",
      "x-nullable": false
    },
    "Name": {
      "description": "Name of the volume.",
      "example": "tardis",
      "type": "string",
      "x-nullable": false
    },
    "Options": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "The driver specific options used when creating the volume.\n",
      "example": {
        "device": "tmpfs",
        "o": "size=100m,uid=1000",
        "type": "tmpfs"
      },
      "type": "object"
    },
    "Scope": {
      "default": "local",
      "description": "The level at which the volume exists. Either `global` for cluster-wide,\nor `local` for machine level.\n",
      "enum": [
        "local",
        "global"
      ],
      "example": "local",
      "type": "string",
      "x-nullable": false
    },
    "Status": {
      "additionalProperties": {
        "type": "object"
      },
      "description": "Low-level details about the volume, provided by the volume driver.\nDetails are returned as a map with key/value pairs:\n`{\"key\":\"value\",\"key2\":\"value2\"}`.\n\nThe `Status` field is optional, and is omitted if the volume driver\ndoes not support this feature.\n",
      "example": {
        "hello": "world"
      },
      "type": "object"
    },
    "UsageData": {
      "description": "Usage details about the volume. This information is used by the\n`GET /system/df` endpoint, and omitted in other endpoints.\n",
      "properties": {
        "RefCount": {
          "default": -1,
          "description": "The number of containers referencing this volume. This field\nis set to `-1` if the reference-count is not available.\n",
          "format": "int64",
          "type": "integer",
          "x-nullable": false
        },
        "Size": {
          "default": -1,
          "description": "Amount of disk space used by the volume (in bytes). This information\nis only available for volumes created with the `\"local\"` volume\ndriver. For volumes created with other volume drivers, this field\nis set to `-1` (\"not available\")\n",
          "format": "int64",
          "type": "integer",
          "x-nullable": false
        }
      },
      "required": [
        "Size",
        "RefCount"
      ],
      "type": "object",
      "x-go-name": "UsageData",
      "x-nullable": true
    }
  },
  "required": [
    "Name",
    "Driver",
    "Mountpoint",
    "Labels",
    "Scope",
    "Options"
  ],
  "type": "object",
  "x-nullable": false
}