{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phala/json-schema/phala-network-config-response-schema.json",
  "title": "NetworkConfigResponse",
  "description": "Real-time network configuration from VMM.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phala-cvms-network-config-api-openapi.yml#/components/schemas/NetworkConfigResponse",
  "properties": {
    "kms_urls": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Kms Urls"
    },
    "gateway_urls": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Gateway Urls"
    },
    "ports": {
      "items": {
        "$ref": "#/$defs/NetworkConfigPortMappingEntry"
      },
      "type": "array",
      "title": "Ports"
    }
  },
  "type": "object",
  "$defs": {
    "NetworkConfigPortMappingEntry": {
      "properties": {
        "host_port": {
          "type": "integer",
          "maximum": 65535.0,
          "minimum": 1.0,
          "title": "Host Port"
        },
        "vm_port": {
          "type": "integer",
          "maximum": 65535.0,
          "minimum": 1.0,
          "title": "Vm Port"
        },
        "protocol": {
          "type": "string",
          "pattern": "^(tcp|udp)$",
          "title": "Protocol",
          "default": "tcp"
        },
        "host_address": {
          "type": "string",
          "title": "Host Address",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "host_port",
        "vm_port"
      ],
      "title": "NetworkConfigPortMappingEntry",
      "description": "Single port mapping rule returned from VMM network config."
    }
  }
}