{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/briq-cloud/json-schema/briq-cloud-key-policy-schema.json",
  "title": "KeyPolicy",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/briq-cloud-v1-openapi.json#/components/schemas/KeyPolicy",
  "type": "object",
  "properties": {
    "maxConcurrentBriqs": {
      "type": "integer",
      "minimum": 0,
      "default": 5
    },
    "dailySpendCapCents": {
      "type": "integer",
      "minimum": 0,
      "default": 1000
    },
    "allowedSizes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "nano",
          "small",
          "medium",
          "large"
        ]
      },
      "default": [
        "nano",
        "small",
        "medium"
      ]
    },
    "allowedRegistries": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [
        "docker.io",
        "ghcr.io",
        "quay.io"
      ]
    },
    "maxSleep": {
      "type": "string",
      "pattern": "^(?:never|[1-9][0-9]{0,4}[mhd])$",
      "default": "never",
      "description": "The longest sleep this credential may give a briq, \"never\" included (\"never\": no bound of its own; the environment and the plan still apply)"
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "default": null
    }
  }
}