{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-list-instance-tokens-response-schema.json",
  "title": "ListInstanceTokensResponse",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-model-experiments-openapi.yml#/components/schemas/ListInstanceTokensResponse",
  "properties": {
    "message": {
      "type": "string"
    },
    "tokens": {
      "items": {
        "$ref": "#/$defs/TokenMetadata"
      },
      "type": "array"
    }
  },
  "required": [
    "tokens"
  ],
  "type": "object",
  "$defs": {
    "Labels": {
      "additionalProperties": {
        "maxLength": 63,
        "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$",
        "type": "string"
      },
      "description": "Object that represents the labels of an object. Regex for keys: `^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys.",
      "type": "object"
    },
    "TokenMetadata": {
      "properties": {
        "description": {
          "maxLength": 160,
          "pattern": "^[0-9a-zA-Z\\s.:\\/\\-]+$",
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "labels": {
          "$ref": "#/$defs/Labels"
        },
        "name": {
          "maxLength": 64,
          "minLength": 1,
          "pattern": "^[0-9a-zA-Z\\s_-]+$",
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "state": {
          "$ref": "#/$defs/TokenState"
        },
        "validUntil": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "state",
        "validUntil",
        "name",
        "region"
      ],
      "type": "object"
    },
    "TokenState": {
      "description": "The lifecycle state of the token.",
      "enum": [
        "creating",
        "active",
        "deleting",
        "inactive"
      ],
      "type": "string"
    }
  }
}