{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-create-token-payload-schema.json",
  "title": "CreateTokenPayload",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-model-serving-openapi.yml#/components/schemas/CreateTokenPayload",
  "properties": {
    "description": {
      "maxLength": 2000,
      "pattern": "^[0-9a-zA-Z\\s.:\\/\\-]+$",
      "type": "string"
    },
    "labels": {
      "$ref": "#/$defs/Labels"
    },
    "name": {
      "maxLength": 200,
      "minLength": 1,
      "pattern": "^[0-9a-zA-Z\\s_-]+$",
      "type": "string"
    },
    "ttlDuration": {
      "description": "time to live duration. Must be valid duration string. If not set the token will never expire.",
      "format": "duration",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object",
  "$defs": {
    "Labels": {
      "additionalProperties": {
        "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: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys.",
      "format": "json",
      "maxProperties": 64,
      "type": "object"
    }
  }
}