Search or ask Docker

GenericResources

GenericResources schema in Docker Engine API 1.57.

View Markdown

Schema

Type: array

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1).
Array item

Type: object

DiscreteResourceSpec

Type: object

Kind

Type: string

All schema constraints and annotations
{
  "type": "string"
}
Value

Type: integer

All schema constraints and annotations
{
  "format": "int64",
  "type": "integer"
}
All schema constraints and annotations
{
  "properties": {
    "Kind": {
      "type": "string"
    },
    "Value": {
      "format": "int64",
      "type": "integer"
    }
  },
  "type": "object"
}
NamedResourceSpec

Type: object

Kind

Type: string

All schema constraints and annotations
{
  "type": "string"
}
Value

Type: string

All schema constraints and annotations
{
  "type": "string"
}
All schema constraints and annotations
{
  "properties": {
    "Kind": {
      "type": "string"
    },
    "Value": {
      "type": "string"
    }
  },
  "type": "object"
}
All schema constraints and annotations
{
  "properties": {
    "DiscreteResourceSpec": {
      "properties": {
        "Kind": {
          "type": "string"
        },
        "Value": {
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "NamedResourceSpec": {
      "properties": {
        "Kind": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
All schema constraints and annotations
{
  "description": "User-defined resources can be either Integer resources (e.g, `SSD=3`) or\nString resources (e.g, `GPU=UUID1`).\n",
  "example": [
    {
      "DiscreteResourceSpec": {
        "Kind": "SSD",
        "Value": 3
      }
    },
    {
      "NamedResourceSpec": {
        "Kind": "GPU",
        "Value": "UUID1"
      }
    },
    {
      "NamedResourceSpec": {
        "Kind": "GPU",
        "Value": "UUID2"
      }
    }
  ],
  "items": {
    "properties": {
      "DiscreteResourceSpec": {
        "properties": {
          "Kind": {
            "type": "string"
          },
          "Value": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "NamedResourceSpec": {
        "properties": {
          "Kind": {
            "type": "string"
          },
          "Value": {
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "type": "object"
  },
  "type": "array"
}