{
  "openapi": "3.0.3",
  "info": {
    "title": "皓量云擎云管理平台 API",
    "version": "0.1.0",
    "description": "仅面向自研 QEMU/KVM、libvirt、OVS/OVN 与主机代理的虚拟化平台公开 API 契约。认证、用户、多租户及 RBAC 已使用 PostgreSQL 实现；原生实例交付路径仍为受鉴权保护的 501。主机注册、SSH 部署与 mTLS 使用独立契约和信任边界。"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8080",
      "description": "本地 Go API"
    }
  ],
  "tags": [
    {
      "name": "System"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Catalog"
    },
    {
      "name": "Instances"
    },
    {
      "name": "Operations"
    },
    {
      "name": "Users"
    },
    {
      "name": "Tenants"
    },
    {
      "name": "RBAC"
    },
    {
      "name": "Audit"
    },
    {
      "name": "Infrastructure"
    },
    {
      "name": "Baremetal",
      "description": "独立物理服务器管理、租户分配与装机任务"
    }
  ],
  "paths": {
    "/healthz": {
      "get": {
        "operationId": "getHealth",
        "tags": [
          "System"
        ],
        "summary": "getHealth",
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/readyz": {
      "get": {
        "operationId": "getReadiness",
        "tags": [
          "System"
        ],
        "summary": "getReadiness",
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/system": {
      "get": {
        "operationId": "getSystemInfo",
        "tags": [
          "System"
        ],
        "summary": "getSystemInfo",
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemInfoResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenAPI",
        "tags": [
          "System"
        ],
        "summary": "getOpenAPI",
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "原始 OpenAPI 文档",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/v1/csrf": {
      "get": {
        "operationId": "getCSRF",
        "tags": [
          "Auth"
        ],
        "summary": "getCSRF",
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CSRFInfoResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "参数校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "身份无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "无权访问",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "真实 PostgreSQL 会话认证；需配置 DATABASE_URL 和 PUBLIC_ORIGIN。当前不实现 MFA 和第三方 API 客户端认证。"
      }
    },
    "/api/auth/v1/login": {
      "post": {
        "operationId": "login",
        "tags": [
          "Auth"
        ],
        "summary": "login",
        "x-implementation-status": "implemented",
        "security": [
          {
            "PreAuthSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserIdentityResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "参数校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "身份无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "无权访问",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "真实 PostgreSQL 会话认证；需配置 DATABASE_URL 和 PUBLIC_ORIGIN。当前不实现 MFA 和第三方 API 客户端认证。",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        }
      }
    },
    "/api/auth/v1/logout": {
      "post": {
        "operationId": "logout",
        "tags": [
          "Auth"
        ],
        "summary": "logout",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "成功，无响应体"
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "参数校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "身份无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "无权访问",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "真实 PostgreSQL 会话认证；需配置 DATABASE_URL 和 PUBLIC_ORIGIN。当前不实现 MFA 和第三方 API 客户端认证。",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ]
      }
    },
    "/api/auth/v1/me": {
      "get": {
        "operationId": "getCurrentUser",
        "tags": [
          "Auth"
        ],
        "summary": "getCurrentUser",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserIdentityResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "参数校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "身份无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "无权访问",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "真实 PostgreSQL 会话认证；需配置 DATABASE_URL 和 PUBLIC_ORIGIN。当前不实现 MFA 和第三方 API 客户端认证。"
      }
    },
    "/api/v1/flavors": {
      "get": {
        "operationId": "listFlavors",
        "tags": [
          "Catalog"
        ],
        "summary": "获取实例规格",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "saveFlavor",
        "tags": [
          "Catalog"
        ],
        "summary": "保存实例规格",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlavorInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/images": {
      "get": {
        "operationId": "listImages",
        "tags": [
          "Catalog"
        ],
        "summary": "获取镜像列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "createImage",
        "tags": [
          "Catalog"
        ],
        "summary": "登记镜像定义",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "返回镜像定义；携带旧 storage_id 时返回下载任务。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageInput"
              }
            }
          }
        },
        "description": "创建一份不绑定单个存储的镜像定义。远程下载与本地文件导入通过存储副本操作执行。旧 storage_id 请求兼容单目标下载并返回操作。"
      }
    },
    "/api/v1/instances": {
      "get": {
        "operationId": "listInstances",
        "tags": [
          "Instances"
        ],
        "summary": "获取实例列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "createInstance",
        "tags": [
          "Instances"
        ],
        "summary": "创建实例",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NativeInstanceInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instances/{instance_id}": {
      "get": {
        "operationId": "getInstance",
        "tags": [
          "Instances"
        ],
        "summary": "获取实例详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "delete": {
        "operationId": "deleteInstance",
        "tags": [
          "Instances"
        ],
        "summary": "回收实例",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instances/{instance_id}/actions": {
      "post": {
        "operationId": "requestInstanceAction",
        "tags": [
          "Instances"
        ],
        "summary": "执行实例操作",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NativeActionInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instances/{instance_id}/console-sessions": {
      "post": {
        "operationId": "createConsoleSession",
        "tags": [
          "Instances"
        ],
        "summary": "createConsoleSession",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsoleSessionResponse"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "参数校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "身份无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "无权访问",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "初始化占位接口，尚未实现",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "身份和范围校验已接入；未登录返回 401，未配置身份数据库返回 503。通过鉴权后资源操作仍返回 501；尚无实例资源仓储或底层交付。",
        "parameters": [
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "X-Tenant-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "只能选择已授权租户；不作为可信归属证明"
          }
        ]
      }
    },
    "/api/v1/operations": {
      "get": {
        "operationId": "listOperations",
        "tags": [
          "Operations"
        ],
        "summary": "获取任务列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/operations/{operation_id}": {
      "get": {
        "operationId": "getOperation",
        "tags": [
          "Operations"
        ],
        "summary": "获取任务详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "operation_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/auth/v1/switch-tenant": {
      "post": {
        "operationId": "switchTenant",
        "tags": [
          "Auth"
        ],
        "summary": "切换当前租户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserIdentityResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMSwitchTenant"
              }
            }
          }
        }
      }
    },
    "/api/auth/v1/password": {
      "post": {
        "operationId": "changePassword",
        "tags": [
          "Auth"
        ],
        "summary": "修改密码并撤销全部会话",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误或当前密码不正确；登录会话保持有效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMPasswordChange"
              }
            }
          }
        }
      }
    },
    "/api/auth/v1/sessions": {
      "delete": {
        "operationId": "revokeMySessions",
        "tags": [
          "Auth"
        ],
        "summary": "撤销自己的所有会话",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/admin/v1/users": {
      "get": {
        "operationId": "listUsers",
        "tags": [
          "Users"
        ],
        "summary": "分页查询用户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMUserListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "post": {
        "operationId": "createUser",
        "tags": [
          "Users"
        ],
        "summary": "创建本地用户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMUserResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMUserCreate"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/users/{user_id}": {
      "patch": {
        "operationId": "updateUser",
        "tags": [
          "Users"
        ],
        "summary": "修改用户名称或状态",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMUserResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMUserUpdate"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/users/{user_id}/password": {
      "put": {
        "operationId": "resetUserPassword",
        "tags": [
          "Users"
        ],
        "summary": "重置密码并撤销用户会话",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMPasswordReset"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/users/{user_id}/platform-roles": {
      "put": {
        "operationId": "assignPlatformRoles",
        "tags": [
          "RBAC"
        ],
        "summary": "分配平台角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMRoleAssignment"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/tenants": {
      "get": {
        "operationId": "listTenants",
        "tags": [
          "Tenants"
        ],
        "summary": "平台查询全部租户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMTenantListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "post": {
        "operationId": "createTenant",
        "tags": [
          "Tenants"
        ],
        "summary": "创建租户及初始零配额",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMTenantResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMTenantCreate"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/tenants/{tenant_id}": {
      "get": {
        "operationId": "getTenant",
        "tags": [
          "Tenants"
        ],
        "summary": "平台查询租户详情",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMTenantResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "patch": {
        "operationId": "updateTenant",
        "tags": [
          "Tenants"
        ],
        "summary": "修改或停用租户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMTenantResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMTenantInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/tenants": {
      "get": {
        "operationId": "listMyTenants",
        "tags": [
          "Tenants"
        ],
        "summary": "查询自己有效加入的租户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMTenantListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/v1/tenants/{tenant_id}/members": {
      "get": {
        "operationId": "listMembers",
        "tags": [
          "Tenants"
        ],
        "summary": "查询租户成员",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMMemberListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "post": {
        "operationId": "createMember",
        "tags": [
          "Tenants"
        ],
        "summary": "添加租户成员与角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMMemberCreate"
              }
            }
          }
        }
      }
    },
    "/api/v1/tenants/{tenant_id}/members/{user_id}": {
      "put": {
        "operationId": "updateMember",
        "tags": [
          "Tenants"
        ],
        "summary": "更新成员状态及角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMMemberInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMember",
        "tags": [
          "Tenants"
        ],
        "summary": "移除租户成员",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/v1/tenants/{tenant_id}/quotas": {
      "get": {
        "operationId": "getQuota",
        "tags": [
          "Tenants"
        ],
        "summary": "查看租户配额上限",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMQuotaResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "put": {
        "operationId": "updateQuota",
        "tags": [
          "Tenants"
        ],
        "summary": "平台配置租户配额上限",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMQuota"
              }
            }
          }
        }
      }
    },
    "/api/v1/tenants/{tenant_id}/permissions": {
      "get": {
        "operationId": "listTenantPermissions",
        "tags": [
          "RBAC"
        ],
        "summary": "查询权限目录",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMPermissionListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/v1/tenants/{tenant_id}/roles": {
      "get": {
        "operationId": "listTenantRoles",
        "tags": [
          "RBAC"
        ],
        "summary": "查询角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMRoleListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "post": {
        "operationId": "createTenantRole",
        "tags": [
          "RBAC"
        ],
        "summary": "创建自定义角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMRoleResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMRoleCreate"
              }
            }
          }
        }
      }
    },
    "/api/v1/tenants/{tenant_id}/roles/{role_id}": {
      "put": {
        "operationId": "updateTenantRole",
        "tags": [
          "RBAC"
        ],
        "summary": "更新自定义角色权限",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMRoleResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMRoleInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTenantRole",
        "tags": [
          "RBAC"
        ],
        "summary": "删除未绑定的自定义角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/v1/tenants/{tenant_id}/audit-logs": {
      "get": {
        "operationId": "listTenantAudits",
        "tags": [
          "Audit"
        ],
        "summary": "查询审计记录",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "end",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "accepted",
                "failed",
                "denied"
              ]
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMAuditListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/admin/v1/permissions": {
      "get": {
        "operationId": "listPlatformPermissions",
        "tags": [
          "RBAC"
        ],
        "summary": "查询权限目录",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMPermissionListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/admin/v1/roles": {
      "get": {
        "operationId": "listPlatformRoles",
        "tags": [
          "RBAC"
        ],
        "summary": "查询角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMRoleListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      },
      "post": {
        "operationId": "createPlatformRole",
        "tags": [
          "RBAC"
        ],
        "summary": "创建自定义角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMRoleResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMRoleCreate"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/roles/{role_id}": {
      "put": {
        "operationId": "updatePlatformRole",
        "tags": [
          "RBAC"
        ],
        "summary": "更新自定义角色权限",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMRoleResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMRoleInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePlatformRole",
        "tags": [
          "RBAC"
        ],
        "summary": "删除未绑定的自定义角色",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/admin/v1/audit-logs": {
      "get": {
        "operationId": "listPlatformAudits",
        "tags": [
          "Audit"
        ],
        "summary": "查询审计记录",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "end",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "accepted",
                "failed",
                "denied"
              ]
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMAuditListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/admin/v1/regions": {
      "get": {
        "operationId": "listRegions",
        "summary": "listRegions",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionListResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ]
      },
      "post": {
        "operationId": "createRegion",
        "summary": "createRegion",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegionInput"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/regions/{region_id}": {
      "put": {
        "operationId": "updateRegion",
        "summary": "updateRegion",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "region_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegionInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteRegion",
        "summary": "deleteRegion",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "204": {
            "description": "成功"
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "region_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/v1/availability-zones": {
      "get": {
        "operationId": "listAvailabilityZones",
        "summary": "listAvailabilityZones",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityZoneListResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ]
      },
      "post": {
        "operationId": "createAvailabilityZone",
        "summary": "createAvailabilityZone",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityZoneResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailabilityZoneInput"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/availability-zones/{zone_id}": {
      "put": {
        "operationId": "updateAvailabilityZone",
        "summary": "updateAvailabilityZone",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityZoneResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "zone_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailabilityZoneInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAvailabilityZone",
        "summary": "deleteAvailabilityZone",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "204": {
            "description": "成功"
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "zone_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/v1/clusters": {
      "get": {
        "operationId": "listClusters",
        "summary": "listClusters",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterListResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ]
      },
      "post": {
        "operationId": "createCluster",
        "summary": "createCluster",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClusterInput"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/clusters/{cluster_id}": {
      "put": {
        "operationId": "updateCluster",
        "summary": "updateCluster",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClusterInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteCluster",
        "summary": "deleteCluster",
        "tags": [
          "Infrastructure"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "平台基础设施目录，真实持久化于 PostgreSQL。写操作要求 infrastructure.manage、Origin 与 CSRF；目录登记不创建底层集群或启用调度。",
        "responses": {
          "204": {
            "description": "成功"
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/tenants/{tenant_id}/ssh-keys": {
      "get": {
        "operationId": "listSSHKeys",
        "summary": "列出租户 SSH 密钥",
        "tags": [
          "SSHKeys"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "仅保存公钥，按租户权限隔离并记录写入审计。删除记录不撤销已注入实例的公钥；实例密钥注入仍随原生交付接入。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyListResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ]
      },
      "post": {
        "operationId": "createSSHKey",
        "summary": "导入虚拟机登录公钥",
        "tags": [
          "SSHKeys"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "仅保存公钥，按租户权限隔离并记录写入审计。删除记录不撤销已注入实例的公钥；实例密钥注入仍随原生交付接入。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSHKeyInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/tenants/{tenant_id}/ssh-keys/{key_id}": {
      "get": {
        "operationId": "getSSHKey",
        "summary": "读取 SSH 公钥详情",
        "tags": [
          "SSHKeys"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "仅保存公钥，按租户权限隔离并记录写入审计。删除记录不撤销已注入实例的公钥；实例密钥注入仍随原生交付接入。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateSSHKey",
        "summary": "修改 SSH 密钥名称与备注",
        "tags": [
          "SSHKeys"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "仅保存公钥，按租户权限隔离并记录写入审计。删除记录不撤销已注入实例的公钥；实例密钥注入仍随原生交付接入。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSHKeyUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSSHKey",
        "summary": "删除 SSH 密钥记录",
        "tags": [
          "SSHKeys"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "仅保存公钥，按租户权限隔离并记录写入审计。删除记录不撤销已注入实例的公钥；实例密钥注入仍随原生交付接入。",
        "responses": {
          "204": {
            "description": "成功"
          },
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/admin/v1/quotas/summary": {
      "get": {
        "operationId": "getQuotaSummary",
        "tags": [
          "Tenants"
        ],
        "summary": "查看平台租户配额汇总",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMQuotaSummaryResponse"
                }
              }
            }
          }
        },
        "description": "需要平台 quota.read 权限。汇总全部租户（含已暂停租户）的配额上限，不代表平台物理容量或实际运行用量。"
      }
    },
    "/api/admin/v1/default-tenant": {
      "put": {
        "operationId": "setDefaultTenant",
        "tags": [
          "Tenants"
        ],
        "summary": "设置默认租户",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "先 GET /api/auth/v1/csrf 获取，与当前 Cookie 会话绑定；写请求同时要求 Origin 等于配置的 PUBLIC_ORIGIN。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMTenantResponse"
                }
              }
            }
          }
        },
        "description": "需要平台 tenant.manage；仅允许正常租户。只更改后续创建资源的默认归属，不迁移已有资源、不变更成员及配额。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IAMDefaultTenantInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/compute-hosts": {
      "get": {
        "operationId": "listComputeHosts",
        "tags": [
          "Infrastructure"
        ],
        "summary": "获取可执行主机",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/storages": {
      "get": {
        "operationId": "listStorages",
        "tags": [
          "Infrastructure"
        ],
        "summary": "获取存储池列表",
        "description": "默认向平台基础设施查看者返回完整列表（含所属主机和是否可选）；租户 volume.manage 或 instance.create 权限返回可用候选。使用 network_id 或 purpose=volume 时只返回对应业务的可用候选，不包含主机、物理容量或错误详情。候选仍需在提交时校验容量等条件。",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "network_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "要求所属租户的 instance.create 权限。按网络所在主机返回系统盘和数据盘可用的存储池，不与 purpose 同时使用。"
          },
          {
            "in": "query",
            "name": "purpose",
            "schema": {
              "type": "string",
              "enum": [
                "volume"
              ]
            },
            "description": "创建独立云硬盘的候选池，要求 volume.manage 权限；可用 tenant_id 指定所属租户，不与 network_id 同时使用。"
          },
          {
            "name": "image_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "template_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createStorage",
        "tags": [
          "Infrastructure"
        ],
        "summary": "登记存储池",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/security-groups": {
      "get": {
        "operationId": "listSecurityGroups",
        "tags": [
          "Catalog"
        ],
        "summary": "获取安全组列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "saveSecurityGroup",
        "tags": [
          "Catalog"
        ],
        "summary": "保存安全组",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecurityGroupInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/volumes": {
      "get": {
        "operationId": "listVolumes",
        "tags": [
          "Catalog"
        ],
        "summary": "获取云硬盘列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "createVolume",
        "tags": [
          "Catalog"
        ],
        "summary": "创建云硬盘",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VolumeInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/checkpoints": {
      "get": {
        "operationId": "listCheckpoints",
        "tags": [
          "Instances"
        ],
        "summary": "获取系统盘副本",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "createCheckpoint",
        "tags": [
          "Instances"
        ],
        "summary": "创建停机系统盘副本",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/storages/{id}": {
      "get": {
        "operationId": "getStorage",
        "tags": [
          "Infrastructure"
        ],
        "summary": "获取资源详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/images/{id}": {
      "get": {
        "operationId": "getImage",
        "tags": [
          "Catalog"
        ],
        "summary": "获取资源详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "patch": {
        "operationId": "updateImage",
        "tags": [
          "Catalog"
        ],
        "summary": "编辑镜像元数据与初始化配置",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteImage",
        "tags": [
          "Catalog"
        ],
        "summary": "删除无引用的镜像定义",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/flavors/{id}": {
      "get": {
        "operationId": "getFlavor",
        "tags": [
          "Catalog"
        ],
        "summary": "获取资源详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/security-groups/{id}": {
      "get": {
        "operationId": "getSecurityGroup",
        "tags": [
          "Catalog"
        ],
        "summary": "获取资源详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "patch": {
        "operationId": "updateSecurityGroup",
        "tags": [
          "Catalog"
        ],
        "summary": "编辑安全组并同步关联实例",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecurityGroupInput"
              }
            }
          }
        },
        "description": "有实例引用时返回同步任务；OVN 事务完成后确认规则，失败可重试。规则更新作用于新连接，已有连接依连接跟踪存续。关联锁定实例时拒绝变更。"
      }
    },
    "/api/v1/volumes/{id}": {
      "get": {
        "operationId": "getVolume",
        "tags": [
          "Catalog"
        ],
        "summary": "获取资源详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/checkpoints/{id}": {
      "get": {
        "operationId": "getCheckpoint",
        "tags": [
          "Instances"
        ],
        "summary": "获取资源详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/volumes/{id}/actions": {
      "post": {
        "operationId": "volumeAction",
        "tags": [
          "Catalog"
        ],
        "summary": "执行云硬盘操作",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiskActionInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/checkpoints/{id}/actions": {
      "post": {
        "operationId": "checkpointAction",
        "tags": [
          "Instances"
        ],
        "summary": "恢复或删除系统盘副本",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckpointActionInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/operations/{operation_id}/retry": {
      "post": {
        "operationId": "retryOperation",
        "tags": [
          "Operations"
        ],
        "summary": "重试失败任务",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "operation_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instances/{instance_id}/resize": {
      "post": {
        "operationId": "resizeInstance",
        "tags": [
          "Instances"
        ],
        "summary": "实例停机改配",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceResizeInput"
              }
            }
          }
        },
        "description": "要求实例已停止、解锁且主机代理至少 0.5.0。实际配置在任务成功后更新；执行中或失败未确认时保留目标预占。系统盘仅支持扩容，客户机分区与文件系统按系统能力另行扩展。"
      }
    },
    "/api/v1/instances/{instance_id}/security-group": {
      "post": {
        "operationId": "bindInstanceSecurityGroup",
        "tags": [
          "Instances"
        ],
        "summary": "更换实例安全组",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceSecurityGroupInput"
              }
            }
          }
        },
        "description": "同租户换绑安全组；OVN 事务完成后确认归属，失败可重试。新连接遵循新规则，既有连接按连接跟踪存续。"
      }
    },
    "/api/v1/instances/{instance_id}/reinstall": {
      "post": {
        "operationId": "reinstallInstance",
        "tags": [
          "Instances"
        ],
        "summary": "重装实例系统",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceReinstallInput"
              }
            }
          }
        },
        "description": "要求实例解锁且不在回收站。运行或暂停时须明确开启 force_stop，代理确认强制关机后再清空系统盘并重建 Cloud-init，完成后启动。保留 UUID、IP、MAC、规格、安全组和已挂载数据盘。失败保留本次选项供任务重试。"
      }
    },
    "/api/v1/instances/{instance_id}/password": {
      "post": {
        "operationId": "resetInstancePassword",
        "tags": [
          "Instances"
        ],
        "summary": "重置实例登录用户密码",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstancePasswordInput"
              }
            }
          }
        },
        "description": "运行中的实例通过 QEMU Guest Agent 修改镜像登录用户的密码。保持 SSH 配置、公钥和电源状态；不在任务、日志或响应中返回密码和散列。需 instance.password 权限及主机代理 0.7.0。"
      }
    },
    "/api/v1/instances/{instance_id}/metrics": {
      "get": {
        "operationId": "getInstanceMetricsHistory",
        "tags": [
          "Instances"
        ],
        "summary": "获取实例历史监控",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "range",
            "schema": {
              "type": "string",
              "enum": [
                "hour",
                "day",
                "week",
                "month",
                "year"
              ],
              "default": "hour"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InstanceMetricsHistory"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "按实例授权查询 CPU、客户机内存、虚拟磁盘 I/O 和网卡历史数据。60 秒采样、保留 365 天。缺失值保留为空。"
      }
    },
    "/api/v1/public-ips": {
      "get": {
        "operationId": "listPublicIPs",
        "tags": [
          "Catalog"
        ],
        "summary": "公网 IP 列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "从公网地址池分配独立地址，计入租户 public_ips 配额。"
      },
      "post": {
        "operationId": "allocatePublicIP",
        "tags": [
          "Catalog"
        ],
        "summary": "分配公网 IP",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicIPInput"
              }
            }
          }
        },
        "description": "从公网地址池分配独立地址，计入租户 public_ips 配额。"
      }
    },
    "/api/v1/public-ips/{id}": {
      "get": {
        "operationId": "getPublicIP",
        "tags": [
          "Catalog"
        ],
        "summary": "获取公网 IP",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "遵循租户网络权限；释放前必须完成解绑。"
      },
      "delete": {
        "operationId": "releasePublicIP",
        "tags": [
          "Instances"
        ],
        "summary": "释放未绑定公网 IP",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "遵循租户网络权限；释放前必须完成解绑。"
      }
    },
    "/api/v1/public-ips/{id}/binding": {
      "post": {
        "operationId": "bindPublicIP",
        "tags": [
          "Catalog"
        ],
        "summary": "绑定或解绑公网 IP",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicIPBindingInput"
              }
            }
          }
        },
        "description": "绑定到同租户、同可用区且已启用分布式公网接入的 VPC 实例。绑定和 OVN 发布状态分别记录；安全组继续约束访问。"
      }
    },
    "/api/v1/vpcs": {
      "get": {
        "operationId": "listVPCs",
        "tags": [
          "Catalog"
        ],
        "summary": "获取VPC",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      },
      "post": {
        "operationId": "createVPC",
        "tags": [
          "Catalog"
        ],
        "summary": "创建VPC",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VPCInput"
              }
            }
          }
        },
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/vpcs/{id}/public-egress": {
      "put": {
        "operationId": "setVPCEgress",
        "summary": "配置 VPC 分布式公网接入",
        "description": "仅平台基础设施管理员可配置。外部网络为 null 时取消接入；已有 EIP 时须先解绑并确认撤销。",
        "tags": [
          "Catalog"
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VPCEgressInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "已保存公网接入配置",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "503": {
            "description": "网络控制服务不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vpcs/{id}": {
      "get": {
        "operationId": "getVPC",
        "tags": [
          "Catalog"
        ],
        "summary": "获取VPC",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "delete": {
        "operationId": "deleteVPC",
        "tags": [
          "Instances"
        ],
        "summary": "删除VPC",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "必须先清理关联实例、子网、网关等资源，任务完成后释放网络对象。"
      }
    },
    "/api/v1/subnets": {
      "get": {
        "operationId": "listSubnets",
        "tags": [
          "Catalog"
        ],
        "summary": "获取子网",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      },
      "post": {
        "operationId": "createSubnet",
        "tags": [
          "Catalog"
        ],
        "summary": "创建子网",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubnetInput"
              }
            }
          }
        },
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/subnets/{id}": {
      "get": {
        "operationId": "getSubnet",
        "tags": [
          "Catalog"
        ],
        "summary": "获取子网",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "delete": {
        "operationId": "deleteSubnet",
        "tags": [
          "Instances"
        ],
        "summary": "删除子网",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "必须先清理关联实例、子网、网关等资源，任务完成后释放网络对象。"
      }
    },
    "/api/v1/network-regions": {
      "get": {
        "operationId": "listNetworkRegions",
        "tags": [
          "Catalog"
        ],
        "summary": "获取可用网络地域",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "实际配置和分配记录，不使用本地预览数据。"
      }
    },
    "/api/v1/ip-pools": {
      "get": {
        "operationId": "listIPPools",
        "tags": [
          "Catalog"
        ],
        "summary": "获取真实外部地址池",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "实际配置和分配记录，不使用本地预览数据。"
      },
      "post": {
        "operationId": "createIPPool",
        "tags": [
          "Catalog"
        ],
        "summary": "添加地址池",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalNetworkInput"
              }
            }
          }
        },
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/ip-pool-uplinks": {
      "get": {
        "operationId": "listPoolUplinks",
        "tags": [
          "Catalog"
        ],
        "summary": "查询可用区已登记的上联网络",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "availability_zone_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolUplinksResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/ip-pools/options": {
      "get": {
        "operationId": "listIPPoolOptions",
        "tags": [
          "Catalog"
        ],
        "summary": "获取实例可用的地址池选项",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "purpose",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "direct",
                "public_ip"
              ]
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "direct 返回 network.read 租户范围内已授权的直连选项：id 为直连网络 ID，external_network_id 为池 ID。public_ip 仅返回就绪公网池，要求平台 infrastructure.read 或租户 network.manage。"
      }
    },
    "/api/v1/ip-pools/{id}/allocations": {
      "get": {
        "operationId": "listIPPoolAllocations",
        "tags": [
          "Catalog"
        ],
        "summary": "获取地址池占用",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "需要平台基础设施查看权限，返回 NAT、映射公网 IP 和直连实例的实际占用。"
      }
    },
    "/api/v1/compute-hosts/{host_id}/network": {
      "get": {
        "operationId": "getHostNetwork",
        "tags": [
          "Catalog"
        ],
        "summary": "读取主机网络状态",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostNetworkResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/compute-hosts/{host_id}/network/refresh": {
      "post": {
        "operationId": "refreshHostNetwork",
        "tags": [
          "Catalog"
        ],
        "summary": "刷新主机网卡与网桥",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/compute-hosts/{host_id}/network/bridges": {
      "post": {
        "operationId": "createHostBridge",
        "tags": [
          "Catalog"
        ],
        "summary": "创建主机上联网桥",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostBridgeConfig"
              }
            }
          }
        },
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/compute-hosts/{host_id}/network/bridges/{id}": {
      "patch": {
        "operationId": "updateHostBridge",
        "tags": [
          "Catalog"
        ],
        "summary": "更新主机上联",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostBridgeConfig"
              }
            }
          }
        },
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      },
      "delete": {
        "operationId": "deleteHostBridge",
        "tags": [
          "Catalog"
        ],
        "summary": "删除主机上联",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "host_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/ip-pools/{id}": {
      "get": {
        "operationId": "getIPPool",
        "tags": [
          "Catalog"
        ],
        "summary": "读取地址池",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      },
      "delete": {
        "operationId": "deleteIPPool",
        "tags": [
          "Catalog"
        ],
        "summary": "删除地址池",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/ip-pools/{id}/tenants": {
      "get": {
        "operationId": "listPoolTenants",
        "tags": [
          "Catalog"
        ],
        "summary": "读取地址池租户授权",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      },
      "post": {
        "operationId": "grantPoolTenant",
        "tags": [
          "Catalog"
        ],
        "summary": "授权租户使用地址池",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PoolTenantInput"
              }
            }
          }
        },
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/ip-pools/{id}/tenants/{tenant_id}": {
      "delete": {
        "operationId": "revokePoolTenant",
        "tags": [
          "Catalog"
        ],
        "summary": "取消地址池授权",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "tenant_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "VPC 模式与直连模式均为持久资源，网络任务由控制面协调。"
      }
    },
    "/api/v1/platform/branding": {
      "get": {
        "operationId": "getPlatformBranding",
        "summary": "读取公开的平台名称与 Logo",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBrandingResponse"
                }
              }
            }
          },
          "503": {
            "description": "平台设置数据库不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/platform/branding/logo": {
      "get": {
        "operationId": "getPlatformLogo",
        "summary": "读取平台 Logo 图片",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [],
        "responses": {
          "200": {
            "description": "PNG/JPG 原图",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "503": {
            "description": "平台设置数据库不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "未设置自定义 Logo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "v",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "由平台设置返回的图片摘要，更新 Logo 后地址变化"
          }
        ]
      }
    },
    "/api/admin/v1/platform/branding": {
      "patch": {
        "operationId": "updatePlatformBranding",
        "summary": "保存平台名称和 Logo（system.manage）",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBrandingResponse"
                }
              }
            }
          },
          "503": {
            "description": "平台设置数据库不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "参数或图片无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "未登录",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "无 system.manage 权限、CSRF 或来源校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformBrandingInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/images/{id}/replicas": {
      "get": {
        "operationId": "listImageReplicas",
        "tags": [
          "Catalog"
        ],
        "summary": "获取镜像存储副本",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceArrayResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "distributeImage",
        "tags": [
          "Catalog"
        ],
        "summary": "向多个存储分发镜像",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageDistributionInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/images/{id}/imports": {
      "post": {
        "operationId": "importImage",
        "tags": [
          "Catalog"
        ],
        "summary": "导入存储中已有镜像文件",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageImportInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/images/{id}/replicas/{replica_id}": {
      "delete": {
        "operationId": "deleteImageReplica",
        "tags": [
          "Catalog"
        ],
        "summary": "移除镜像存储副本",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "replica_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/instance-templates": {
      "get": {
        "operationId": "listInstanceTemplates",
        "tags": [
          "Instances"
        ],
        "summary": "实例模板列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "createInstanceTemplate",
        "tags": [
          "Instances"
        ],
        "summary": "从关机实例制作整实例模板",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceTemplateInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instance-templates/{id}": {
      "get": {
        "operationId": "getInstanceTemplate",
        "tags": [
          "Instances"
        ],
        "summary": "实例模板详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instance-templates/{id}/actions": {
      "post": {
        "operationId": "instanceTemplateAction",
        "tags": [
          "Instances"
        ],
        "summary": "删除实例模板",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceTemplateActionInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instance-templates/{id}/clone": {
      "post": {
        "operationId": "cloneInstanceTemplate",
        "tags": [
          "Instances"
        ],
        "summary": "克隆实例模板",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceTemplateCloneInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/backup-policies": {
      "get": {
        "operationId": "listBackupPolicies",
        "tags": [
          "Instances"
        ],
        "summary": "备份策略列表",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "post": {
        "operationId": "createBackupPolicy",
        "tags": [
          "Instances"
        ],
        "summary": "创建备份策略",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupPolicyInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/backup-policies/{id}": {
      "get": {
        "operationId": "getBackupPolicy",
        "tags": [
          "Instances"
        ],
        "summary": "备份策略详情",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "patch": {
        "operationId": "updateBackupPolicy",
        "tags": [
          "Instances"
        ],
        "summary": "编辑备份策略",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupPolicyInput"
              }
            }
          }
        },
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      },
      "delete": {
        "operationId": "deleteBackupPolicy",
        "tags": [
          "Instances"
        ],
        "summary": "删除备份策略",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/backup-policies/{id}/run": {
      "post": {
        "operationId": "runBackupPolicy",
        "tags": [
          "Instances"
        ],
        "summary": "立即执行备份策略",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/backup-policy-runs": {
      "get": {
        "operationId": "listBackupPolicyRuns",
        "tags": [
          "Instances"
        ],
        "summary": "备份策略执行记录",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instances/{instance_id}/backup-storages": {
      "get": {
        "operationId": "listBackupStorages",
        "tags": [
          "Instances"
        ],
        "summary": "实例可用的同主机副本存储",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "原生 KVM 资源与持久操作。写入需要平台登录、CSRF 及资源权限；执行结果以任务状态和实际观测为准。"
      }
    },
    "/api/v1/instances/{instance_id}/hostname": {
      "post": {
        "operationId": "changeInstanceHostname",
        "tags": [
          "Instances"
        ],
        "summary": "修改客户机主机名",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceHostnameInput"
              }
            }
          }
        },
        "description": "修改 Linux 客户机主机名，独立于实例显示名称。运行中需 QEMU Guest Agent 已连接，关机时离线修改系统盘；同步 Cloud-init 持久配置。需要 instance.resize 权限和主机代理 0.12.0，成功确认后提交配置，失败可重试。"
      }
    },
    "/api/v1/resources/{kind}/{id}/metadata": {
      "get": {
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "instances",
                "volumes",
                "images",
                "storages",
                "compute-hosts",
                "clusters",
                "vpcs",
                "subnets",
                "security-groups",
                "public-ips",
                "checkpoints",
                "flavors",
                "ip-pools",
                "backup-policies"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "tags": [
          "resources"
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceMetadataResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getResourceMetadata",
        "summary": "读取资源标签和备注",
        "x-implementation-status": "implemented"
      },
      "put": {
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "instances",
                "volumes",
                "images",
                "storages",
                "compute-hosts",
                "clusters",
                "vpcs",
                "subnets",
                "security-groups",
                "public-ips",
                "checkpoints",
                "flavors",
                "ip-pools",
                "backup-policies"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "tags": [
          "resources"
        ],
        "responses": {
          "200": {
            "description": "操作已记录；data.id 为任务 UUID，data.resource_id 为资源 UUID。执行是否完成以任务状态和真实观测为准。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceMetadataResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "updateResourceMetadata",
        "summary": "修改资源标签和备注",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceMetadataInput"
              }
            }
          }
        },
        "x-implementation-status": "implemented"
      }
    },
    "/api/v1/clusters": {
      "get": {
        "operationId": "listComputeClusters",
        "tags": [
          "Infrastructure"
        ],
        "summary": "获取集群及容量汇总",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "需要平台 infrastructure.read 权限；使用真实主机与实例分配数据。"
      }
    },
    "/api/v1/cluster-hosts": {
      "get": {
        "operationId": "listClusterHosts",
        "tags": [
          "Infrastructure"
        ],
        "summary": "获取集群成员及可加入的已纳管主机",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "需要平台 infrastructure.read 权限；使用真实主机与实例分配数据。"
      }
    },
    "/api/v1/clusters/{id}": {
      "get": {
        "operationId": "getComputeCluster",
        "tags": [
          "Infrastructure"
        ],
        "summary": "获取集群详情与容量",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clusters/{id}/hosts": {
      "post": {
        "operationId": "joinClusterHosts",
        "tags": [
          "Infrastructure"
        ],
        "summary": "向集群加入主机",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClusterHostsInput"
              }
            }
          }
        },
        "description": "需要 infrastructure.manage。主机须位于同一可用区、架构一致、内网 IP 唯一且在线就绪；加入不迁移现有实例。"
      }
    },
    "/api/v1/clusters/{id}/hosts/{host_id}": {
      "delete": {
        "operationId": "removeClusterHost",
        "tags": [
          "Infrastructure"
        ],
        "summary": "从集群移出主机",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "host_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "须先暂停主机调度并等待任务结束。保留主机、实例、网络及磁盘，移出后作为独立主机管理。"
      }
    },
    "/api/v1/instances/{instance_id}/resources": {
      "get": {
        "operationId": "getInstanceResources",
        "tags": [
          "Instances"
        ],
        "summary": "获取实例关联磁盘、网络、快照与备份",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceResourcesResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "要求租户实例读取权限，或当前实例的分配读取权限。"
      }
    },
    "/api/admin/v1/upload-targets": {
      "get": {
        "operationId": "listUploadTargets",
        "summary": "上传配置列表",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTargetListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createUploadTarget",
        "summary": "创建上传配置",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTargetResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadTargetInput"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/upload-targets/{upload_target_id}": {
      "patch": {
        "operationId": "updateUploadTarget",
        "summary": "更新上传配置",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTargetResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "upload_target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadTargetInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteUploadTarget",
        "summary": "删除上传配置",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "parameters": [
          {
            "name": "upload_target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/v1/upload-targets/{upload_target_id}/test": {
      "post": {
        "operationId": "testUploadTarget",
        "summary": "测试连接（写入并删除无敏感测试文件）",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "parameters": [
          {
            "name": "upload_target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/v1/platform-backup-status": {
      "get": {
        "operationId": "getPlatformBackupStatus",
        "summary": "平台数据备份服务状态",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBackupStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/platform-backups": {
      "get": {
        "operationId": "listPlatformBackups",
        "summary": "平台数据备份列表",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBackupListResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ]
      },
      "post": {
        "operationId": "createPlatformBackup",
        "summary": "创建平台数据完整备份",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBackupResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformBackupInput"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/platform-backups/{backup_id}": {
      "get": {
        "operationId": "getPlatformBackup",
        "summary": "平台数据备份详情",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBackupResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "delete": {
        "operationId": "deletePlatformBackup",
        "summary": "删除本地及远端平台备份",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "成功"
          }
        },
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/v1/platform-backups/{backup_id}/retry": {
      "post": {
        "operationId": "retryPlatformBackup",
        "summary": "重试失败备份或上传",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBackupResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformBackupRetryInput"
              }
            }
          }
        }
      }
    },
    "/api/admin/v1/platform-backups/{backup_id}/download": {
      "get": {
        "operationId": "downloadPlatformBackup",
        "summary": "下载加密平台备份",
        "description": "平台数据管理：要求 system.manage；包含全部租户数据，普通租户不可访问。写操作要求 Origin 和 CSRF。恢复采用离线流程，不覆盖运行中的业务库。",
        "tags": [
          "System"
        ],
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "400": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "恢复密码加密的 tar.gz.age 归档",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/monitoring/rules": {
      "get": {
        "operationId": "listMonitoringRules",
        "tags": [
          "Monitoring"
        ],
        "summary": "查询告警规则",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRuleListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createMonitoringRule",
        "tags": [
          "Monitoring"
        ],
        "summary": "创建告警规则",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRuleResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringRuleInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/rules/{id}": {
      "put": {
        "operationId": "updateMonitoringRule",
        "tags": [
          "Monitoring"
        ],
        "summary": "更新告警规则",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRuleResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringRuleInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMonitoringRule",
        "tags": [
          "Monitoring"
        ],
        "summary": "删除告警规则",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "完成"
          }
        }
      }
    },
    "/api/v1/monitoring/channels": {
      "get": {
        "operationId": "listMonitoringChannels",
        "tags": [
          "Monitoring"
        ],
        "summary": "查询通知渠道",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringChannelListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createMonitoringChannel",
        "tags": [
          "Monitoring"
        ],
        "summary": "创建通知渠道",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringChannelResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringChannelInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/channels/{id}": {
      "put": {
        "operationId": "updateMonitoringChannel",
        "tags": [
          "Monitoring"
        ],
        "summary": "更新通知渠道",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringChannelResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringChannelInput"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMonitoringChannel",
        "tags": [
          "Monitoring"
        ],
        "summary": "删除通知渠道",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "完成"
          }
        }
      }
    },
    "/api/v1/monitoring/alerts": {
      "get": {
        "operationId": "listMonitoringAlerts",
        "tags": [
          "Monitoring"
        ],
        "summary": "查询告警事件",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringAlertListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/notifications": {
      "get": {
        "operationId": "listMonitoringNotifications",
        "tags": [
          "Monitoring"
        ],
        "summary": "查询通知记录",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringNotificationListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/channels/{id}/test": {
      "post": {
        "operationId": "testMonitoringChannel",
        "tags": [
          "Monitoring"
        ],
        "summary": "发送渠道测试通知",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringQueuedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/alerts/{id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeMonitoringAlert",
        "tags": [
          "Monitoring"
        ],
        "summary": "确认告警",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "完成"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringAckInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/notifications/{id}/retry": {
      "post": {
        "operationId": "retryMonitoringNotification",
        "tags": [
          "Monitoring"
        ],
        "summary": "重试失败通知",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "完成"
          }
        }
      }
    },
    "/api/v1/monitoring/targets": {
      "get": {
        "operationId": "listMonitoringTargets",
        "tags": [
          "Monitoring"
        ],
        "summary": "查询可选资源",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "host",
                "instance"
              ]
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringTargetListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/status": {
      "get": {
        "operationId": "getMonitoringStatus",
        "tags": [
          "Monitoring"
        ],
        "summary": "查询告警执行器状态",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit-logs": {
      "get": {
        "operationId": "listVisibleAudits",
        "tags": [
          "Audit"
        ],
        "summary": "查询审计记录",
        "x-implementation-status": "implemented",
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "end",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "tenant_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "accepted",
                "failed",
                "denied"
              ]
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "登录无效或已撤销",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "权限、范围或 CSRF 校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "记录不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "引用或唯一性冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "请求过于频繁",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "数据库未配置或不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IAMAuditListResponse"
                }
              }
            }
          }
        },
        "description": "PostgreSQL 持久化；角色、租户状态与成员资格在每次请求的数据库事务中重新校验。未配置 DATABASE_URL 时返回 503。"
      }
    },
    "/api/v1/baremetal/nodes": {
      "get": {
        "operationId": "listBaremetalNodes",
        "tags": [
          "Baremetal"
        ],
        "summary": "listBaremetalNodes",
        "x-implementation-status": "implemented",
        "x-permission": "infrastructure.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalNodeListResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createBaremetalNode",
        "tags": [
          "Baremetal"
        ],
        "summary": "createBaremetalNode",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalNodeResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalNodeInput"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/nodes/{node_id}": {
      "put": {
        "operationId": "updateBaremetalNode",
        "tags": [
          "Baremetal"
        ],
        "summary": "updateBaremetalNode",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalNodeResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "node_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalNodeInput"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/nodes/{node_id}/actions": {
      "post": {
        "operationId": "baremetalNodeAction",
        "tags": [
          "Baremetal"
        ],
        "summary": "baremetalNodeAction",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "202": {
            "description": "已受理",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalTaskResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "维护状态已保存",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalNodeResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "node_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalAction"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/flavors": {
      "get": {
        "operationId": "listBaremetalFlavors",
        "tags": [
          "Baremetal"
        ],
        "summary": "listBaremetalFlavors",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalFlavorListResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createBaremetalFlavor",
        "tags": [
          "Baremetal"
        ],
        "summary": "createBaremetalFlavor",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalFlavorResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalFlavorInput"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/flavors/{flavor_id}": {
      "put": {
        "operationId": "updateBaremetalFlavor",
        "tags": [
          "Baremetal"
        ],
        "summary": "updateBaremetalFlavor",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalFlavorResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "flavor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalFlavorInput"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/images": {
      "get": {
        "operationId": "listBaremetalImages",
        "tags": [
          "Baremetal"
        ],
        "summary": "listBaremetalImages",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalImageListResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/images/{image_id}": {
      "put": {
        "operationId": "setBaremetalImage",
        "tags": [
          "Baremetal"
        ],
        "summary": "setBaremetalImage",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "204": {
            "description": "成功"
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "image_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalImageInput"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/allocations": {
      "get": {
        "operationId": "listBaremetalAllocations",
        "tags": [
          "Baremetal"
        ],
        "summary": "listBaremetalAllocations",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalAllocationListResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      },
      "post": {
        "operationId": "createBaremetalAllocation",
        "tags": [
          "Baremetal"
        ],
        "summary": "createBaremetalAllocation",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.allocate",
        "responses": {
          "202": {
            "description": "已受理",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalTaskResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalAllocationInput"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ]
      }
    },
    "/api/v1/baremetal/allocations/{allocation_id}": {
      "get": {
        "operationId": "getBaremetalAllocation",
        "tags": [
          "Baremetal"
        ],
        "summary": "getBaremetalAllocation",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalAllocationResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "allocation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/allocations/{allocation_id}/actions": {
      "post": {
        "operationId": "baremetalAllocationAction",
        "tags": [
          "Baremetal"
        ],
        "summary": "baremetalAllocationAction",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.allocate",
        "responses": {
          "202": {
            "description": "已受理",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalTaskResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "allocation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalAction"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/tasks": {
      "get": {
        "operationId": "listBaremetalTasks",
        "tags": [
          "Baremetal"
        ],
        "summary": "listBaremetalTasks",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalTaskListResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/tasks/{task_id}": {
      "get": {
        "operationId": "getBaremetalTask",
        "tags": [
          "Baremetal"
        ],
        "summary": "getBaremetalTask",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.read",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalTaskResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/candidates": {
      "get": {
        "operationId": "listBaremetalCandidates",
        "tags": [
          "Baremetal"
        ],
        "summary": "查看可分配的物理主机",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.allocate",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetalCandidateListResponse"
                }
              }
            }
          },
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/allocations/{allocation_id}/console-sessions": {
      "post": {
        "operationId": "createBaremetalConsole",
        "tags": [
          "Baremetal"
        ],
        "summary": "创建 IPMI SOL 串口控制台会话",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.console",
        "responses": {
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "会话已创建",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsoleSessionResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "allocation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/baremetal/nodes/{node_id}/credentials": {
      "patch": {
        "operationId": "updateBaremetalCredentials",
        "tags": [
          "Baremetal"
        ],
        "summary": "更新 BMC 管理凭据",
        "x-implementation-status": "implemented",
        "x-permission": "baremetal.manage",
        "responses": {
          "default": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "已更新"
          }
        },
        "parameters": [
          {
            "name": "node_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetalCredentials"
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/instances/{instance_id}/assignees": {
      "get": {
        "operationId": "listInstanceAssignees",
        "summary": "列出可分配的租户成员",
        "description": "需要实例所属租户的实例分配权限。",
        "tags": [
          "Instances"
        ],
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceAssigneeListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{instance_id}/assignment": {
      "put": {
        "operationId": "assignInstance",
        "summary": "设置实例使用者",
        "description": "仅接受同租户的启用成员。传入 null 解除分配。",
        "tags": [
          "Instances"
        ],
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceAssignmentInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/instances/{instance_id}/reinstall-images": {
      "get": {
        "operationId": "listInstanceReinstallImages",
        "summary": "列出实例可用的重装镜像",
        "description": "需要当前实例的重装权限。",
        "tags": [
          "Instances"
        ],
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceReinstallImagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/network-zones": {
      "get": {
        "operationId": "listNetworkZones",
        "tags": [
          "Catalog"
        ],
        "summary": "列出可用于创建子网的可用区",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "description": "实际配置和分配记录，不使用本地预览数据。"
      }
    },
    "/api/v1/ip-pools/{id}/hosts": {
      "get": {
        "operationId": "listPoolHosts",
        "tags": [
          "Catalog"
        ],
        "summary": "查询地址池的实时主机接入状态",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolHostsResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/ip-pools/{id}/reservations": {
      "post": {
        "operationId": "createPoolReservation",
        "tags": [
          "Catalog"
        ],
        "summary": "手动预留地址池 IP",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PoolReservationInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/ip-pools/{id}/reservations/{reservation_id}": {
      "delete": {
        "operationId": "deletePoolReservation",
        "tags": [
          "Catalog"
        ],
        "summary": "释放手动预留 IP",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reservation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "成功"
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ]
      }
    },
    "/api/v1/rate-limits/{kind}/{id}": {
      "put": {
        "operationId": "setResourceRateLimits",
        "tags": [
          "Catalog"
        ],
        "summary": "设置实例网卡、弹性公网 IP 或云硬盘的限速",
        "x-implementation-status": "implemented",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "instances",
                "public_ips",
                "volumes"
              ]
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "返回操作任务或云硬盘资源",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "请求无法完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceRateLimits"
              }
            }
          }
        },
        "description": "替换资源的限速值。网卡和 EIP 接受上行及下行带宽上限，云硬盘接受 IOPS 及吞吐量上限。空值或省略对应上限时取消该方向或指标的限制。返回操作任务，未挂载的云硬盘直接保存配置并返回资源。"
      }
    }
  },
  "components": {
    "schemas": {
      "HealthStatus": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "ready"
            ]
          },
          "service": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "service",
          "version"
        ]
      },
      "ImplementationState": {
        "type": "string",
        "enum": [
          "implemented",
          "planned"
        ]
      },
      "SystemInfo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "phase": {
            "type": "string",
            "enum": [
              "bootstrap"
            ]
          },
          "modules": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ImplementationState"
            }
          },
          "compute_backend": {
            "type": "string",
            "enum": [
              "native_kvm"
            ],
            "description": "本项目仅开发自研 KVM 管理后端；实际能力以 modules 的实现状态为准。"
          },
          "host_transport": {
            "type": "string",
            "enum": [
              "grpc_mtls"
            ],
            "description": "自研主机代理的管理通道；不代表实例写操作已经实现。"
          }
        },
        "required": [
          "name",
          "version",
          "phase",
          "modules",
          "compute_backend",
          "host_transport"
        ]
      },
      "ErrorDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "NOT_IMPLEMENTED",
              "NOT_FOUND",
              "AUTH_REQUIRED",
              "FORBIDDEN",
              "VALIDATION_FAILED",
              "CONFLICT",
              "SERVICE_UNAVAILABLE",
              "INTERNAL_ERROR",
              "RATE_LIMITED"
            ]
          },
          "message": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "code",
          "message",
          "retryable"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "request_id"
        ]
      },
      "PageInfo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "page",
          "page_size",
          "total"
        ]
      },
      "CSRFInfo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "csrf_token": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "csrf_token",
          "expires_at"
        ]
      },
      "LoginRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "writeOnly": true
          }
        },
        "required": [
          "username",
          "password"
        ]
      },
      "UserIdentity": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "platform_permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantMembership"
            }
          },
          "active_tenant_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "display_name",
          "platform_permissions",
          "tenants",
          "active_tenant_id"
        ]
      },
      "TenantMembership": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "tenant_id",
          "name",
          "roles",
          "permissions"
        ]
      },
      "Flavor": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer",
            "minimum": 1
          },
          "memory_mib": {
            "type": "integer",
            "minimum": 128
          },
          "system_disk_gib": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "name",
          "vcpus",
          "memory_mib",
          "system_disk_gib"
        ]
      },
      "Image": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "architecture": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "disabled"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "version",
          "architecture",
          "status"
        ]
      },
      "Instance": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "provisioning",
              "available",
              "deleting",
              "deleted",
              "error"
            ]
          },
          "power_state": {
            "type": "string",
            "enum": [
              "running",
              "stopped",
              "unknown"
            ]
          },
          "readiness": {
            "type": "string",
            "enum": [
              "unknown",
              "initializing",
              "ready",
              "failed"
            ]
          },
          "operation_id": {
            "type": "string",
            "nullable": true
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "restrictions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availability_zone_id": {
            "type": "string",
            "minLength": 1,
            "description": "实例所属可用区；原生调度按主机、存储可达性及网络域选择实际位置。"
          },
          "host_id": {
            "type": "string",
            "nullable": true,
            "description": "实际放置的原生主机；尚未调度时为空。"
          },
          "domain_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "稳定关联的 libvirt Domain UUID；尚未定义实例时为空。"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "name",
          "availability_zone_id",
          "lifecycle",
          "power_state",
          "readiness",
          "operation_id",
          "observed_at",
          "restrictions"
        ]
      },
      "InstanceCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "flavor_id": {
            "type": "string",
            "minLength": 1
          },
          "image_id": {
            "type": "string",
            "minLength": 1
          },
          "network_id": {
            "type": "string",
            "minLength": 1
          },
          "initialization": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "hostname": {
                "type": "string",
                "maxLength": 253
              },
              "ssh_public_keys": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "password": {
                "type": "string",
                "writeOnly": true,
                "maxLength": 1024
              },
              "ssh_key_ids": {
                "type": "array",
                "uniqueItems": true,
                "maxItems": 10,
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "同租户 SSH 密钥引用；交付时解析并固化公钥，实际注入依赖支持 Cloud-Init 的镜像。实例交付仍未实现。"
              }
            },
            "required": []
          },
          "external_resource_ref": {
            "type": "string",
            "maxLength": 256
          },
          "availability_zone_id": {
            "type": "string",
            "minLength": 1,
            "description": "实例所属可用区；原生调度按主机、存储可达性及网络域选择实际位置。"
          },
          "storage_id": {
            "type": "string",
            "format": "uuid",
            "description": "系统盘目标存储，与镜像副本存储独立；旧客户端省略时仅复用已有就绪副本的存储。"
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "flavor_id",
          "image_id",
          "network_id"
        ]
      },
      "InstanceActionRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "start",
              "shutdown",
              "stop",
              "reboot",
              "restrict",
              "unrestrict",
              "reinstall"
            ]
          },
          "image_id": {
            "type": "string",
            "description": "重装时必须指定镜像；由应用服务校验"
          },
          "confirmation": {
            "type": "boolean",
            "description": "重装等破坏性操作需要显式确认"
          }
        },
        "required": [
          "action"
        ]
      },
      "Operation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "waiting_confirmation",
              "compensating",
              "succeeded",
              "failed",
              "needs_attention",
              "cancelled"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ErrorDetail"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "tenant_id",
          "resource_id",
          "type",
          "status",
          "created_at",
          "updated_at"
        ]
      },
      "AcceptedOperation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "resource_id": {
            "type": "string"
          },
          "operation_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued"
            ]
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "resource_id",
          "operation_id",
          "status",
          "status_url"
        ]
      },
      "ConsoleSession": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "expires_at"
        ]
      },
      "HealthStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/HealthStatus"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "SystemInfoResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SystemInfo"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "CSRFInfoResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CSRFInfo"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "UserIdentityResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UserIdentity"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "InstanceResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Instance"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "OperationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Operation"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "AcceptedOperationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AcceptedOperation"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "ConsoleSessionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ConsoleSession"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "FlavorListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Flavor"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "meta",
          "request_id"
        ]
      },
      "ImageListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "meta",
          "request_id"
        ]
      },
      "InstanceListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Instance"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "meta",
          "request_id"
        ]
      },
      "OperationListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "meta",
          "request_id"
        ]
      },
      "IAMUser": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "platform_role_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "status",
          "created_at",
          "platform_role_ids"
        ]
      },
      "IAMUserCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "username": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.-]{2,63}$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 1024,
            "writeOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          }
        },
        "required": [
          "username",
          "display_name",
          "password",
          "status"
        ]
      },
      "IAMUserUpdate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          }
        },
        "required": [
          "display_name",
          "status"
        ]
      },
      "IAMTenant": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "remark": {
            "type": "string",
            "maxLength": 500
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_default": {
            "type": "boolean",
            "description": "是否为平台默认资源归属；不代表成员关系或额外权限。"
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "status",
          "remark",
          "created_at",
          "is_default"
        ]
      },
      "IAMTenantInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "remark": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "name",
          "status",
          "remark"
        ]
      },
      "IAMTenantCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "remark": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "code",
          "name",
          "status",
          "remark"
        ]
      },
      "IAMRole": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "scope": {
            "type": "string",
            "enum": [
              "platform",
              "tenant"
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "builtin": {
            "type": "boolean"
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "scope",
          "tenant_id",
          "builtin",
          "description",
          "permissions"
        ]
      },
      "IAMRoleInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "description",
          "permissions"
        ]
      },
      "IAMRoleCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "code",
          "name",
          "description",
          "permissions"
        ]
      },
      "IAMRoleAssignment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "role_ids": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "role_ids"
        ]
      },
      "IAMMember": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "user_status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "role_ids": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "user_id",
          "username",
          "display_name",
          "status",
          "user_status",
          "role_ids",
          "created_at"
        ]
      },
      "IAMMemberInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "role_ids": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "status",
          "role_ids"
        ]
      },
      "IAMMemberCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "role_ids": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "user_id",
          "status",
          "role_ids"
        ]
      },
      "IAMQuota": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "instances": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "maximum": 1000000,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "vcpu": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "maximum": 10000000,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "memory": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "maximum": 100000000,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "storage": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "maximum": 1000000000,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "public_ips": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "maximum": 1000000,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "baremetal_nodes": {
            "type": "integer",
            "minimum": -1,
            "description": "-1 为不限制，0 为禁止分配；内存单位 GiB"
          },
          "baremetal_vcpu": {
            "type": "integer",
            "minimum": -1,
            "description": "-1 为不限制，0 为禁止分配；内存单位 GiB"
          },
          "baremetal_memory": {
            "type": "integer",
            "minimum": -1,
            "description": "-1 为不限制，0 为禁止分配；内存单位 GiB"
          }
        },
        "required": [
          "instances",
          "vcpu",
          "memory",
          "storage",
          "public_ips"
        ],
        "description": "租户各项配额：-1 表示不限制，0 表示禁止分配，正整数表示上限。"
      },
      "IAMPermission": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "platform_only": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name",
          "platform_only"
        ]
      },
      "IAMAudit": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "actor_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "action": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "actor_name": {
            "type": "string"
          },
          "actor_username": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "source_ip": {
            "type": "string"
          },
          "request_method": {
            "type": "string"
          },
          "request_path": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "operation_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "required": [
          "id",
          "tenant_id",
          "actor_id",
          "action",
          "resource_id",
          "request_id",
          "created_at",
          "actor_name",
          "actor_username",
          "tenant_name",
          "source_ip",
          "request_method",
          "request_path",
          "outcome",
          "operation_id"
        ]
      },
      "IAMUserResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IAMUser"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "IAMTenantResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IAMTenant"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "IAMRoleResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IAMRole"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "IAMQuotaResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IAMQuota"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "IAMUserListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAMUser"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "IAMTenantListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAMTenant"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "IAMRoleListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAMRole"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "IAMMemberListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAMMember"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "IAMAuditListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAMAudit"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "IAMPermissionListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAMPermission"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "IAMSwitchTenant": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "description": "租户 UUID；null 表示查看全部已授权租户，不扩大访问权限。单租户成员自动进入所属租户。",
            "nullable": true
          }
        },
        "required": [
          "tenant_id"
        ]
      },
      "IAMPasswordChange": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "writeOnly": true
          },
          "new_password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 1024,
            "writeOnly": true
          }
        },
        "required": [
          "current_password",
          "new_password"
        ]
      },
      "IAMPasswordReset": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 1024,
            "writeOnly": true
          }
        },
        "required": [
          "password"
        ]
      },
      "RegionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$",
            "description": "创建后不可修改"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "country_code": {
            "type": "string",
            "pattern": "^([A-Z]{2})?$",
            "maxLength": 2,
            "description": "国家/地区两字母大写代码；空字符串表示未指定。更新时省略则保留原值。"
          }
        },
        "required": [
          "name",
          "code",
          "status"
        ]
      },
      "Region": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$",
            "description": "创建后不可修改"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "country_code": {
            "type": "string",
            "pattern": "^([A-Z]{2})?$",
            "maxLength": 2,
            "description": "国家/地区两字母大写代码；空字符串表示未指定。更新时省略则保留原值。"
          }
        },
        "required": [
          "name",
          "code",
          "status",
          "description",
          "id",
          "created_at",
          "updated_at",
          "country_code"
        ]
      },
      "RegionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Region"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "RegionListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Region"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "AvailabilityZoneInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$",
            "description": "创建后不可修改"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "region_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name",
          "code",
          "status",
          "region_id"
        ]
      },
      "AvailabilityZone": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$",
            "description": "创建后不可修改"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "region_id": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "code",
          "status",
          "description",
          "region_id",
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "AvailabilityZoneResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AvailabilityZone"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "AvailabilityZoneListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityZone"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "ClusterInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$",
            "description": "创建后不可修改"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "host_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 128,
            "description": "创建或编辑时追加同可用区已纳管主机，不会移除已有成员。"
          }
        },
        "required": [
          "name",
          "code",
          "status",
          "availability_zone_id"
        ]
      },
      "Cluster": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{1,47}$",
            "description": "创建后不可修改"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "code",
          "status",
          "description",
          "availability_zone_id",
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "ClusterResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Cluster"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "ClusterListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Cluster"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "SSHKeyInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "public_key"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "public_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384,
            "description": "一条不带 authorized_keys 选项的 OpenSSH 公钥；支持 Ed25519 或至少 2048 位 RSA。禁止上传私钥。"
          }
        }
      },
      "SSHKeyUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          }
        }
      },
      "SSHKey": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "description",
          "id",
          "tenant_id",
          "public_key",
          "algorithm",
          "bits",
          "fingerprint",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "public_key": {
            "type": "string",
            "description": "归一化后的 OpenSSH 公钥，不包含注释和私钥。"
          },
          "algorithm": {
            "type": "string",
            "enum": [
              "ssh-ed25519",
              "ssh-rsa"
            ]
          },
          "bits": {
            "type": "integer",
            "minimum": 256
          },
          "fingerprint": {
            "type": "string",
            "description": "公钥 SHA256 指纹。"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SSHKeyResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SSHKey"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "SSHKeyListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SSHKey"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "IAMQuotaSummary": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "instances": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "vcpu": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "memory": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "storage": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "public_ips": {
            "type": "integer",
            "format": "int64",
            "minimum": -1,
            "description": "-1 表示不限制；0 表示禁止分配。"
          },
          "tenant_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "baremetal_nodes": {
            "type": "integer",
            "minimum": -1,
            "description": "-1 为不限制，0 为禁止分配；内存单位 GiB"
          },
          "baremetal_vcpu": {
            "type": "integer",
            "minimum": -1,
            "description": "-1 为不限制，0 为禁止分配；内存单位 GiB"
          },
          "baremetal_memory": {
            "type": "integer",
            "minimum": -1,
            "description": "-1 为不限制，0 为禁止分配；内存单位 GiB"
          }
        },
        "required": [
          "instances",
          "vcpu",
          "memory",
          "storage",
          "public_ips",
          "tenant_count"
        ],
        "description": "各项 -1 表示不限制，0 表示禁止分配，正整数表示上限。汇总中任一租户该项不限制时，合计为 -1。"
      },
      "IAMQuotaSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IAMQuotaSummary"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "IAMDefaultTenantInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "tenant_id"
        ]
      },
      "VPCEgressInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "external_network_id"
        ],
        "properties": {
          "external_network_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        }
      },
      "NativeResource": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "对象 UUID。异步操作响应中为任务 UUID，资源 UUID 由 resource_id 提供。"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "eip_external_network_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "eip_external_network_name": {
            "type": "string",
            "nullable": true
          },
          "publication_state": {
            "type": "string",
            "enum": [
              "allocated",
              "pending",
              "published",
              "withdrawal_pending"
            ],
            "description": "OVN 发布状态，不代表公网探测结果。"
          },
          "published_host_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "string"
          },
          "host_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "host_name": {
            "type": "string"
          },
          "availability_zone_id": {
            "type": "string"
          },
          "storage_id": {
            "type": "string"
          },
          "storage_name": {
            "type": "string"
          },
          "storage_type": {
            "$ref": "#/components/schemas/StorageBackendType"
          },
          "image_id": {
            "type": "string"
          },
          "image_name": {
            "type": "string"
          },
          "flavor_id": {
            "type": "string"
          },
          "flavor_name": {
            "type": "string"
          },
          "network_id": {
            "type": "string"
          },
          "network_name": {
            "type": "string"
          },
          "instance_name": {
            "type": "string",
            "nullable": true
          },
          "architecture": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "资源类型。对于存储池及候选池，表示存储后端类型，当前仅有 local。"
          },
          "selectable": {
            "type": "boolean",
            "description": "存储池是否可作为新磁盘候选，取决于存储状态、主机可达性和地域归属；不表示容量足够。"
          },
          "action": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "mac": {
            "type": "string"
          },
          "cidr": {
            "type": "string",
            "nullable": true
          },
          "gateway": {
            "type": "string"
          },
          "os": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "login_user": {
            "type": "string"
          },
          "guest_os": {
            "type": "string"
          },
          "guest_hostname": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "host_last_seen": {
            "type": "string"
          },
          "region_id": {
            "type": "string"
          },
          "actor_id": {
            "type": "string"
          },
          "actor_name": {
            "type": "string"
          },
          "resource_id": {
            "type": "string",
            "description": "异步操作的目标资源 UUID。"
          },
          "resource_name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "lifecycle": {
            "type": "string"
          },
          "power_state": {
            "type": "string"
          },
          "readiness": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "request_digest": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string",
            "nullable": true
          },
          "instance_id": {
            "type": "string",
            "nullable": true
          },
          "operation_id": {
            "type": "string",
            "nullable": true
          },
          "recycled_at": {
            "type": "string",
            "nullable": true
          },
          "observed_at": {
            "type": "string",
            "nullable": true
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mib": {
            "type": "integer"
          },
          "disk_gib": {
            "type": "integer"
          },
          "size_gib": {
            "type": "integer"
          },
          "size_bytes": {
            "type": "integer"
          },
          "capacity_bytes": {
            "type": "integer"
          },
          "available_bytes": {
            "type": "integer"
          },
          "min_disk_gib": {
            "type": "integer"
          },
          "progress": {
            "type": "integer"
          },
          "locked": {
            "type": "boolean"
          },
          "guest_agent": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "ready": {
            "type": "boolean"
          },
          "host_ready": {
            "type": "boolean"
          },
          "host_finished": {
            "type": "boolean"
          },
          "network_ready": {
            "type": "boolean"
          },
          "guest_addresses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "direction": {
                  "type": "string",
                  "enum": [
                    "ingress",
                    "egress"
                  ]
                },
                "protocol": {
                  "type": "string",
                  "enum": [
                    "all",
                    "tcp",
                    "udp",
                    "icmp"
                  ]
                },
                "cidr": {
                  "type": "string"
                },
                "port_min": {
                  "type": "integer"
                },
                "port_max": {
                  "type": "integer"
                }
              },
              "required": [
                "direction",
                "protocol",
                "cidr"
              ]
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "at",
                "message",
                "progress",
                "state"
              ],
              "properties": {
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "message": {
                  "type": "string"
                },
                "progress": {
                  "type": "integer"
                },
                "state": {
                  "type": "string"
                }
              }
            }
          },
          "provider_name": {
            "type": "string"
          },
          "pool_start": {
            "type": "string"
          },
          "pool_end": {
            "type": "string"
          },
          "external_network_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "external_network_name": {
            "type": "string"
          },
          "external_ip": {
            "type": "string"
          },
          "target_flavor_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "target_security_group_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "target_vcpus": {
            "type": "integer",
            "nullable": true
          },
          "target_memory_mib": {
            "type": "integer",
            "nullable": true
          },
          "target_disk_gib": {
            "type": "integer",
            "nullable": true
          },
          "security_group_name": {
            "type": "string"
          },
          "target_security_group_name": {
            "type": "string",
            "nullable": true
          },
          "agent_version": {
            "type": "string"
          },
          "applied_rules": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "direction": {
                  "type": "string",
                  "enum": [
                    "ingress",
                    "egress"
                  ]
                },
                "protocol": {
                  "type": "string",
                  "enum": [
                    "all",
                    "tcp",
                    "udp",
                    "icmp"
                  ]
                },
                "cidr": {
                  "type": "string"
                },
                "port_min": {
                  "type": "integer"
                },
                "port_max": {
                  "type": "integer"
                }
              },
              "required": [
                "direction",
                "protocol",
                "cidr"
              ]
            }
          },
          "target_image_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "target_reinstall_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "target_image_name": {
            "type": "string",
            "nullable": true
          },
          "ssh_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "登录公钥快照。"
          },
          "active_operation": {
            "type": "object",
            "nullable": true,
            "required": [
              "id",
              "action",
              "state",
              "progress",
              "message"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "action": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "progress": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "public_ip": {
            "type": "string",
            "nullable": true
          },
          "private_ip": {
            "type": "string",
            "nullable": true
          },
          "target_instance_name": {
            "type": "string",
            "nullable": true
          },
          "target_instance_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "vpc_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "vpc_name": {
            "type": "string",
            "nullable": true
          },
          "mode": {
            "type": "string",
            "nullable": true
          },
          "network_mode": {
            "type": "string",
            "nullable": true
          },
          "public_ip_mode": {
            "type": "string",
            "nullable": true
          },
          "address_scope": {
            "type": "string",
            "nullable": true
          },
          "allocation_type": {
            "type": "string",
            "nullable": true
          },
          "subnet_count": {
            "type": "integer"
          },
          "instance_count": {
            "type": "integer"
          },
          "pool_size": {
            "type": "integer"
          },
          "allocated_count": {
            "type": "integer"
          },
          "vlan_id": {
            "type": "integer"
          },
          "mtu": {
            "type": "integer"
          },
          "dns_servers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "format": {
            "type": "string"
          },
          "image_format": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "verified_at": {
            "type": "string"
          },
          "installation_state": {
            "type": "string"
          },
          "replica_count": {
            "type": "integer"
          },
          "ready_replica_count": {
            "type": "integer"
          },
          "virtual_size_bytes": {
            "type": "integer"
          },
          "cloud_init_enabled": {
            "type": "boolean"
          },
          "qemu_guest_agent_enabled": {
            "type": "boolean"
          },
          "installation_replica_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ready_storage_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          },
          "configuration": {
            "type": "object",
            "additionalProperties": true
          },
          "format_version": {
            "type": "integer"
          },
          "source_name": {
            "type": "string"
          },
          "policy_id": {
            "type": "string",
            "nullable": true
          },
          "schedule": {
            "type": "string"
          },
          "run_time": {
            "type": "string"
          },
          "weekday": {
            "type": "integer"
          },
          "keep_last": {
            "type": "integer"
          },
          "allow_shutdown": {
            "type": "boolean"
          },
          "next_run_at": {
            "type": "string",
            "format": "date-time"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "result_message": {
            "type": "string"
          },
          "target_checkpoint_id": {
            "type": "string",
            "nullable": true
          },
          "instance_state": {
            "type": "string",
            "nullable": true,
            "description": "挂载实例的实际状态"
          },
          "instance_locked": {
            "type": "boolean",
            "nullable": true,
            "description": "挂载实例是否锁定"
          },
          "instance_recycled_at": {
            "type": "string",
            "nullable": true,
            "description": "挂载实例的回收时间"
          },
          "instance_busy": {
            "type": "boolean",
            "description": "挂载实例存在执行中任务或未完成变更"
          },
          "target": {
            "type": "string",
            "description": "客户机中的磁盘设备名，如 vdb"
          },
          "hostname": {
            "type": "string",
            "description": "已配置的客户机主机名"
          },
          "target_hostname": {
            "type": "string",
            "nullable": true,
            "description": "尚未完成的目标主机名"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          },
          "cluster_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "cluster_name": {
            "type": "string"
          },
          "cluster_status": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "online": {
            "type": "boolean"
          },
          "schedulable": {
            "type": "boolean"
          },
          "member_count": {
            "type": "integer",
            "format": "int64"
          },
          "online_count": {
            "type": "integer",
            "format": "int64"
          },
          "schedulable_count": {
            "type": "integer",
            "format": "int64"
          },
          "allocated_vcpus": {
            "type": "integer",
            "format": "int64"
          },
          "allocated_memory_mib": {
            "type": "integer",
            "format": "int64"
          },
          "available_vcpus": {
            "type": "integer",
            "format": "int64"
          },
          "available_memory_mib": {
            "type": "integer",
            "format": "int64"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "availability_zone_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "readOnly": true,
            "description": "实例创建用户，由服务端取当前认证用户。历史创建记录缺失时为空。"
          },
          "creator_name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "creator_username": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "tenant_name": {
            "type": "string",
            "readOnly": true
          },
          "backup_mode": {
            "type": "string",
            "enum": [
              "full",
              "incremental"
            ],
            "description": "全量或增量备份，省略时按全量处理。"
          },
          "parent_backup_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "parent_backup_name": {
            "type": "string",
            "nullable": true
          },
          "chain_depth": {
            "type": "integer",
            "minimum": 0
          },
          "dependent_count": {
            "type": "integer",
            "minimum": 0
          },
          "stored_bytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "minimum": 0
          },
          "full_every": {
            "type": "integer",
            "minimum": 2,
            "maximum": 365
          },
          "os_type": {
            "type": "string",
            "enum": [
              "linux",
              "windows"
            ],
            "description": "客户机系统类型；Windows 自动初始化通过 QEMU Guest Agent 执行。"
          },
          "firmware": {
            "type": "string",
            "enum": [
              "bios",
              "uefi"
            ],
            "description": "启动固件。新 Windows 实例必须使用 UEFI，镜像须已具备 GPT/EFI 引导。"
          },
          "available_ip_count": {
            "description": "按实际自动分配范围计算的剩余 IP 数量。",
            "type": "integer",
            "minimum": 0
          },
          "assigned_user_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "assignee_name": {
            "type": "string",
            "nullable": true
          },
          "assignee_username": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "手动预留地址的备注。"
          },
          "storage_group": {
            "type": "string",
            "description": "当前网络下的本地存储兼容组标识。"
          },
          "upload_limit_kbps": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4294967295,
            "nullable": true,
            "description": "上行带宽上限，单位 kbps。对应实例发出的流量。空值表示不限速。"
          },
          "download_limit_kbps": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4294967295,
            "nullable": true,
            "description": "下行带宽上限，单位 kbps。对应实例接收的流量。空值表示不限速。"
          },
          "max_iops": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "nullable": true,
            "description": "读写合计 IOPS 上限。空值表示不限速。"
          },
          "max_bytes_per_second": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 1099511627776,
            "nullable": true,
            "description": "读写合计吞吐量上限，单位字节/秒。空值表示不限速。"
          }
        },
        "required": [
          "id"
        ]
      },
      "NativeResourceResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NativeResource"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "NativeResourceListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          },
          "meta": {
            "type": "object",
            "required": [
              "total"
            ],
            "properties": {
              "total": {
                "type": "integer"
              },
              "page": {
                "type": "integer"
              },
              "page_size": {
                "type": "integer"
              }
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "meta",
          "request_id"
        ]
      },
      "StorageBackendType": {
        "type": "string",
        "enum": [
          "local",
          "lvm",
          "rbd"
        ],
        "description": "存储后端类型，与云硬盘用途无关：local（本地目录 / QCOW2）、lvm（本地专用 VG 逻辑卷）、rbd（Ceph RBD 镜像）。"
      },
      "StorageInput": {
        "type": "object",
        "additionalProperties": false,
        "description": "登记存储池。省略 type 时使用 local；local 省略 id 时由平台分配 UUID 并验证共用数据挂载。lvm 需提供专用 VG，rbd 需提供 Ceph 接入参数与访问主机。",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "独立挂载的存储池 UUID。仅 local 使用；填写前须将设备挂载到 storages/<此 UUID>。"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/StorageBackendType"
          },
          "host_id": {
            "type": "string",
            "format": "uuid",
            "description": "登记主机。local/lvm 为唯一所属主机；rbd 用作记录主机，实际访问范围由 host_ids 决定。"
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "vg_name": {
            "type": "string",
            "maxLength": 128,
            "description": "lvm 专用卷组名。卷组须预先创建，且只允许存放平台管理的逻辑卷。"
          },
          "ceph_monitors": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "maxItems": 16,
            "description": "rbd 的 Ceph monitor 地址，例如 10.0.0.1:6789。"
          },
          "ceph_pool": {
            "type": "string",
            "maxLength": 128,
            "description": "rbd 使用的既有 Ceph 存储池。"
          },
          "ceph_user": {
            "type": "string",
            "maxLength": 128,
            "description": "rbd 使用的 CephX 用户名。"
          },
          "ceph_key": {
            "type": "string",
            "maxLength": 4096,
            "description": "rbd 使用的 CephX 密钥，仅写入时提交，平台加密保存且不回显。"
          },
          "ceph_fsid": {
            "type": "string",
            "maxLength": 128,
            "description": "可选的 Ceph 集群 FSID；留空由主机验证时读取。"
          },
          "host_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 64,
            "description": "rbd 允许访问此池的计算主机。省略时仅使用 host_id。local/lvm 忽略此字段。"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        },
        "required": [
          "name",
          "host_id",
          "availability_zone_id"
        ]
      },
      "ImageInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "storage_id": {
            "type": "string",
            "deprecated": true
          },
          "os": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "architecture": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "login_user": {
            "type": "string"
          },
          "min_disk_gib": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "qcow2",
              "raw"
            ]
          },
          "cloud_init_enabled": {
            "type": "boolean",
            "description": "启用客户机自动初始化。Linux 使用 Cloud-Init，Windows 使用 Cloudbase-Init 读取 NoCloud 配置盘。"
          },
          "qemu_guest_agent_enabled": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          },
          "os_type": {
            "type": "string",
            "enum": [
              "linux",
              "windows"
            ],
            "description": "客户机系统类型；Windows 自动初始化通过 QEMU Guest Agent 执行。"
          },
          "firmware": {
            "type": "string",
            "enum": [
              "bios",
              "uefi"
            ],
            "description": "启动固件。新 Windows 实例必须使用 UEFI，镜像须已具备 GPT/EFI 引导。"
          }
        },
        "required": [
          "name",
          "os",
          "version",
          "architecture",
          "min_disk_gib"
        ]
      },
      "FlavorInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mib": {
            "type": "integer"
          },
          "disk_gib": {
            "type": "integer"
          },
          "architecture": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "vcpus",
          "memory_mib",
          "disk_gib",
          "architecture",
          "enabled"
        ]
      },
      "SecurityGroupInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "direction": {
                  "type": "string",
                  "enum": [
                    "ingress",
                    "egress"
                  ]
                },
                "protocol": {
                  "type": "string",
                  "enum": [
                    "all",
                    "tcp",
                    "udp",
                    "icmp"
                  ]
                },
                "cidr": {
                  "type": "string"
                },
                "port_min": {
                  "type": "integer"
                },
                "port_max": {
                  "type": "integer"
                }
              },
              "required": [
                "direction",
                "protocol",
                "cidr"
              ]
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        },
        "required": [
          "name",
          "rules"
        ]
      },
      "NativeInstanceInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "availability_zone_id": {
            "type": "string"
          },
          "flavor_id": {
            "type": "string"
          },
          "image_id": {
            "type": "string"
          },
          "network_id": {
            "type": "string"
          },
          "security_group_id": {
            "type": "string"
          },
          "requested_ip": {
            "type": "string"
          },
          "ssh_key_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "minLength": 12,
            "maxLength": 128,
            "description": "所选镜像登录用户的密码；与 SSH 密钥至少提供一项。明文仅用于本次请求。"
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "vpc",
              "classic"
            ],
            "default": "vpc",
            "description": "VPC 子网或管理员授权的直连网络；直连必须显式选择 classic。"
          },
          "storage_id": {
            "type": "string",
            "format": "uuid",
            "description": "系统盘目标存储，与镜像副本存储独立；旧客户端省略时仅复用已有就绪副本的存储。"
          },
          "hostname": {
            "type": "string",
            "maxLength": 63,
            "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$",
            "description": "客户机主机名，创建时不填则由实例名称带入"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          },
          "system_disk_gib": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1048576,
            "description": "系统盘容量（GiB）；省略时采用规格默认值，实际容量不得小于镜像最小容量。"
          },
          "data_disks": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/InstanceDataDiskInput"
            },
            "description": "同时新建并挂载数据盘，按顺序分配 vdb–vdz；存储须与实例属于同一主机、可用区。"
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "flavor_id",
          "image_id",
          "network_id",
          "security_group_id"
        ]
      },
      "NativeActionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "start",
              "shutdown",
              "stop",
              "reboot",
              "lock",
              "unlock",
              "inspect",
              "recycle",
              "restore",
              "purge"
            ]
          },
          "confirmation": {
            "type": "string"
          }
        },
        "required": [
          "action"
        ]
      },
      "VolumeInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "storage_id": {
            "type": "string"
          },
          "size_gib": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        },
        "required": [
          "name",
          "storage_id",
          "size_gib"
        ]
      },
      "DiskActionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "attach",
              "detach",
              "resize",
              "delete"
            ]
          },
          "instance_id": {
            "type": "string"
          },
          "size_gib": {
            "type": "integer"
          }
        },
        "required": [
          "action"
        ]
      },
      "CheckpointInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "snapshot",
              "backup"
            ]
          },
          "storage_id": {
            "type": "string",
            "format": "uuid",
            "description": "同主机目标存储，快照固定系统盘原存储"
          },
          "allow_shutdown": {
            "type": "boolean",
            "default": false,
            "description": "仅备份可用；正常关机，完成后恢复原运行状态"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          },
          "backup_mode": {
            "type": "string",
            "enum": [
              "full",
              "incremental"
            ],
            "description": "全量或增量备份，省略时按全量处理。"
          }
        },
        "required": [
          "name",
          "instance_id",
          "type"
        ]
      },
      "CheckpointActionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "restore",
              "delete"
            ]
          }
        },
        "required": [
          "action"
        ]
      },
      "ExternalNetworkInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "availability_zone_id",
          "provider_name",
          "cidr",
          "gateway",
          "pool_start",
          "pool_end"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider_name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.-]{1,32}$"
          },
          "cidr": {
            "type": "string"
          },
          "gateway": {
            "type": "string",
            "format": "ipv4"
          },
          "pool_start": {
            "type": "string",
            "format": "ipv4"
          },
          "pool_end": {
            "type": "string",
            "format": "ipv4"
          },
          "vlan_id": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4094,
            "default": 0,
            "description": "0 为未打标签 Flat，1–4094 为 VLAN。"
          },
          "mtu": {
            "type": "integer",
            "minimum": 1280,
            "maximum": 9000,
            "default": 1500
          },
          "dns_servers": {
            "type": "array",
            "maxItems": 6,
            "items": {
              "type": "string",
              "format": "ipv4"
            }
          },
          "address_scope": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ],
            "default": "public"
          }
        },
        "description": "可用区级外部网络；哪些主机接入由实时 OVN 桥映射派生。"
      },
      "InstanceResizeInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "flavor_id"
        ],
        "properties": {
          "flavor_id": {
            "type": "string",
            "format": "uuid"
          },
          "system_disk_gib": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1048576,
            "default": 0,
            "description": "0 或省略时取当前系统盘容量与目标规格最小系统盘容量的较大值。"
          }
        }
      },
      "InstanceSecurityGroupInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "security_group_id"
        ],
        "properties": {
          "security_group_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "InstanceReinstallInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "image_id",
          "confirmation"
        ],
        "properties": {
          "image_id": {
            "type": "string",
            "format": "uuid"
          },
          "ssh_key_ids": {
            "type": "array",
            "maxItems": 20,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "minLength": 12,
            "maxLength": 128,
            "description": "所选镜像登录用户的密码；与 SSH 密钥至少提供一项。明文仅用于本次请求。"
          },
          "confirmation": {
            "type": "string",
            "description": "当前实例名称，确认清空系统盘。"
          },
          "force_stop": {
            "type": "boolean",
            "default": false,
            "description": "是否授权重装前强制关机；运行或暂停时必须开启。默认 false，已关机时可直接重装。需主机代理 0.6.1。"
          }
        }
      },
      "InstancePasswordInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "password"
        ],
        "properties": {
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "minLength": 12,
            "maxLength": 128,
            "description": "所选镜像登录用户的密码；与 SSH 密钥至少提供一项。明文仅用于本次请求。"
          }
        }
      },
      "InstanceMetricsHistory": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "format": "int64"
          },
          "step_seconds": {
            "type": "integer",
            "minimum": 60
          },
          "sample_interval_seconds": {
            "type": "integer",
            "enum": [
              60
            ]
          },
          "retention_days": {
            "type": "integer",
            "enum": [
              365
            ]
          },
          "pending_samples": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostMetricSeries"
            }
          },
          "instance_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "start",
          "end",
          "step_seconds",
          "sample_interval_seconds",
          "retention_days",
          "pending_samples",
          "series",
          "instance_id"
        ]
      },
      "HostMetricSeries": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "metric": {
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostMetricPoint"
            }
          }
        },
        "required": [
          "metric",
          "points"
        ]
      },
      "HostMetricPoint": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "Unix 毫秒"
          },
          "value": {
            "type": "number",
            "nullable": true,
            "description": "缺失数据为 null，不以 0 填充"
          }
        },
        "required": [
          "timestamp",
          "value"
        ]
      },
      "PublicIPInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "external_network_id"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "external_network_id": {
            "type": "string",
            "format": "uuid"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        }
      },
      "PublicIPBindingInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "instance_id"
        ],
        "properties": {
          "instance_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "实例 UUID；null 表示解绑。"
          }
        }
      },
      "VPCInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "region_id",
          "cidr"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "region_id": {
            "type": "string",
            "format": "uuid"
          },
          "cidr": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        }
      },
      "HostBridgeConfig": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "bridge_name",
          "provider_name",
          "interfaces",
          "bond_mode",
          "mtu",
          "existing"
        ],
        "properties": {
          "bridge_name": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]{0,14}$"
          },
          "provider_name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.-]{1,32}$"
          },
          "interfaces": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          },
          "bond_mode": {
            "type": "string",
            "enum": [
              "",
              "active-backup",
              "balance-slb",
              "balance-tcp"
            ]
          },
          "mtu": {
            "type": "integer",
            "minimum": 1280,
            "maximum": 9000
          },
          "existing": {
            "type": "boolean"
          }
        }
      },
      "HostNetworkInterface": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "mac": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "bridge": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "mtu": {
            "type": "integer"
          },
          "addresses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "protected": {
            "type": "boolean"
          },
          "admin_up": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "kind",
          "mac",
          "state",
          "bridge",
          "reason",
          "mtu",
          "addresses",
          "protected"
        ],
        "additionalProperties": false
      },
      "HostNetworkBridge": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "bond_mode": {
            "type": "string"
          },
          "managed_id": {
            "type": "string"
          },
          "mtu": {
            "type": "integer"
          },
          "interfaces": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "existing": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "bond_mode",
          "managed_id",
          "mtu",
          "interfaces",
          "providers",
          "existing"
        ],
        "additionalProperties": false
      },
      "HostNetworkInventory": {
        "type": "object",
        "properties": {
          "collected_at": {
            "type": "string",
            "format": "date-time"
          },
          "interfaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostNetworkInterface"
            }
          },
          "bridges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostNetworkBridge"
            }
          }
        },
        "required": [
          "collected_at",
          "interfaces",
          "bridges"
        ],
        "additionalProperties": false
      },
      "HostBridgeRecord": {
        "type": "object",
        "properties": {
          "bridge_name": {
            "type": "string"
          },
          "provider_name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "host_id": {
            "type": "string",
            "format": "uuid"
          },
          "config": {
            "$ref": "#/components/schemas/HostBridgeConfig"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "bridge_name",
          "provider_name",
          "state",
          "error",
          "id",
          "host_id",
          "config",
          "created_at"
        ],
        "additionalProperties": false
      },
      "HostNetwork": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agent_version": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          },
          "inventory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HostNetworkInventory"
              }
            ],
            "nullable": true
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "bridges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostBridgeRecord"
            }
          }
        },
        "required": [
          "id",
          "agent_version",
          "ready",
          "inventory",
          "collected_at",
          "bridges"
        ],
        "additionalProperties": false
      },
      "HostNetworkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/HostNetwork"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "PoolTenantInput": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "tenant_id"
        ],
        "additionalProperties": false
      },
      "SubnetInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "availability_zone_id": {
            "type": "string"
          },
          "cidr": {
            "type": "string"
          },
          "vpc_id": {
            "type": "string",
            "format": "uuid",
            "description": "所属 VPC。省略时兼容旧客户端，使用默认 VPC。"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "cidr",
          "vpc_id"
        ]
      },
      "PlatformBranding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "platform_name",
          "logo_url",
          "copyright",
          "theme_color"
        ],
        "properties": {
          "platform_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "logo_url": {
            "type": "string",
            "nullable": true,
            "description": "同源 Logo 地址；null 使用内置 Logo"
          },
          "copyright": {
            "type": "string",
            "maxLength": 256,
            "description": "底部版权文字，空字符串显示平台名称"
          },
          "theme_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$",
            "description": "平台统一主题色"
          }
        }
      },
      "PlatformBrandingInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "platform_name",
          "copyright",
          "theme_color"
        ],
        "properties": {
          "platform_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "logo_base64": {
            "type": "string",
            "format": "byte",
            "maxLength": 2796204,
            "description": "可选 PNG/JPG 图片的标准 Base64；最大 2 MiB，宽高最多 2048 像素；省略保留当前 Logo"
          },
          "reset_logo": {
            "type": "boolean",
            "default": false,
            "description": "恢复内置 Logo，与 logo_base64 互斥"
          },
          "copyright": {
            "type": "string",
            "maxLength": 256,
            "description": "底部版权文字，空字符串显示平台名称"
          },
          "theme_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$",
            "description": "平台统一主题色"
          }
        }
      },
      "PlatformBrandingResponse": {
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlatformBranding"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "ImageDistributionInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "storage_ids"
        ],
        "properties": {
          "storage_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ImageImportInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "storage_id",
          "source_path"
        ],
        "properties": {
          "storage_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_path": {
            "type": "string",
            "description": "存储 imports 目录内的相对路径，例如 imports/debian13.qcow2"
          }
        }
      },
      "NativeResourceArrayResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          }
        }
      },
      "InstanceTemplateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          },
          "storage_id": {
            "type": "string",
            "format": "uuid",
            "description": "同主机目标存储，快照固定系统盘原存储"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        },
        "required": [
          "name",
          "instance_id"
        ]
      },
      "InstanceTemplateActionInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "delete"
            ]
          }
        },
        "required": [
          "action"
        ]
      },
      "InstanceTemplateCloneInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "availability_zone_id": {
            "type": "string"
          },
          "network_id": {
            "type": "string"
          },
          "security_group_id": {
            "type": "string"
          },
          "requested_ip": {
            "type": "string"
          },
          "ssh_key_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "minLength": 12,
            "maxLength": 128,
            "description": "所选镜像登录用户的密码；与 SSH 密钥至少提供一项。明文仅用于本次请求。"
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "vpc",
              "classic"
            ],
            "default": "vpc",
            "description": "VPC 子网或管理员授权的直连网络；直连必须显式选择 classic。"
          },
          "storage_id": {
            "type": "string",
            "format": "uuid",
            "description": "系统盘目标存储，与镜像副本存储独立；旧客户端省略时仅复用已有就绪副本的存储。"
          },
          "hostname": {
            "type": "string",
            "maxLength": 63,
            "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$",
            "description": "客户机主机名，创建时不填则由实例名称带入"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "network_id",
          "security_group_id"
        ]
      },
      "BackupPolicyInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "instance_id",
          "storage_id",
          "schedule",
          "run_time",
          "keep_last",
          "enabled",
          "allow_shutdown"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "instance_id": {
            "type": "string",
            "format": "uuid"
          },
          "storage_id": {
            "type": "string",
            "format": "uuid"
          },
          "schedule": {
            "type": "string",
            "enum": [
              "daily",
              "weekly"
            ]
          },
          "run_time": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "description": "Asia/Shanghai 时区 HH:mm"
          },
          "weekday": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6,
            "default": 1,
            "description": "周日为 0"
          },
          "keep_last": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          },
          "enabled": {
            "type": "boolean"
          },
          "allow_shutdown": {
            "type": "boolean"
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "backup_mode": {
            "type": "string",
            "enum": [
              "full",
              "incremental"
            ],
            "description": "全量或增量备份，省略时按全量处理。"
          },
          "full_every": {
            "type": "integer",
            "minimum": 2,
            "maximum": 365,
            "description": "增量策略每 N 次备份启动一轮全量，首次及磁盘配置变化时自动全量。"
          }
        }
      },
      "ResourceMetadata": {
        "type": "object",
        "required": [
          "id",
          "name",
          "tags",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "ResourceMetadataInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tags",
          "description"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "仅实例可修改显示名称，不联动客户机主机名"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 20,
            "description": "资源标签，去除首尾空格并去重"
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          }
        }
      },
      "ResourceMetadataResponse": {
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ResourceMetadata"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "InstanceHostnameInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "hostname"
        ],
        "properties": {
          "hostname": {
            "type": "string",
            "maxLength": 63,
            "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$",
            "description": "客户机主机名，创建时不填则由实例名称带入"
          }
        }
      },
      "ClusterHostsInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "host_ids"
        ],
        "properties": {
          "host_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 128,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "InstanceDataDiskInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "storage_id",
          "size_gib"
        ],
        "properties": {
          "storage_id": {
            "type": "string",
            "format": "uuid"
          },
          "size_gib": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1048576,
            "description": "容量（GiB）"
          },
          "delete_with_instance": {
            "type": "boolean",
            "default": true,
            "description": "彻底删除实例时一并删除；回收站内仍保留磁盘。"
          }
        }
      },
      "InstanceResources": {
        "type": "object",
        "required": [
          "volumes",
          "checkpoints",
          "public_ips",
          "backup_policies",
          "network",
          "security_group",
          "region_name",
          "availability_zone_name",
          "tenant_name"
        ],
        "properties": {
          "volumes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          },
          "checkpoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          },
          "public_ips": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          },
          "backup_policies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeResource"
            }
          },
          "network": {
            "$ref": "#/components/schemas/NativeResource"
          },
          "security_group": {
            "$ref": "#/components/schemas/NativeResource"
          },
          "region_name": {
            "type": "string"
          },
          "availability_zone_name": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          }
        }
      },
      "InstanceResourcesResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InstanceResources"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "UploadTargetSettings": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "access_key_id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "path_style": {
            "type": "boolean"
          },
          "tls": {
            "type": "boolean"
          }
        },
        "required": [
          "endpoint",
          "bucket",
          "region",
          "prefix",
          "access_key_id",
          "username",
          "path_style",
          "tls"
        ]
      },
      "UploadTargetInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "provider": {
            "type": "string",
            "enum": [
              "s3",
              "aliyun",
              "tencent",
              "qiniu",
              "ftp"
            ]
          },
          "settings": {
            "$ref": "#/components/schemas/UploadTargetSettings"
          },
          "enabled": {
            "type": "boolean"
          },
          "secret": {
            "type": "string",
            "maxLength": 4096,
            "writeOnly": true,
            "description": "留空保留原凭据；新建必填"
          }
        },
        "required": [
          "name",
          "provider",
          "settings",
          "enabled"
        ]
      },
      "UploadTarget": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "s3",
              "aliyun",
              "tencent",
              "qiniu",
              "ftp"
            ]
          },
          "settings": {
            "$ref": "#/components/schemas/UploadTargetSettings"
          },
          "enabled": {
            "type": "boolean"
          },
          "has_secret": {
            "type": "boolean"
          },
          "references": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "provider",
          "settings",
          "enabled",
          "has_secret",
          "references",
          "created_at",
          "updated_at"
        ]
      },
      "UploadTargetResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UploadTarget"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "UploadTargetListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UploadTarget"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "PlatformBackupEvent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "time",
          "message"
        ]
      },
      "PlatformBackup": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "actor_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "target_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "target_name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "remote_key": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "backup",
              "delete"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "uploading",
              "succeeded",
              "failed",
              "delete_queued",
              "deleting",
              "deleted"
            ]
          },
          "progress": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "message": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformBackupEvent"
            }
          },
          "filename": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "sha256": {
            "type": "string"
          },
          "uploaded": {
            "type": "boolean"
          },
          "local_available": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "actor_id",
          "target_id",
          "target_name",
          "provider",
          "remote_key",
          "action",
          "state",
          "progress",
          "message",
          "events",
          "filename",
          "size_bytes",
          "sha256",
          "uploaded",
          "local_available",
          "created_at",
          "updated_at",
          "finished_at"
        ]
      },
      "PlatformBackupInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "target_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "minLength": 12,
            "maxLength": 1024
          }
        },
        "required": [
          "name",
          "password"
        ]
      },
      "PlatformBackupRetryInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "password": {
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "maxLength": 1024
          }
        },
        "required": []
      },
      "PlatformBackupStatus": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ready": {
            "type": "boolean"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "ready",
          "last_seen",
          "version"
        ]
      },
      "PlatformBackupResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlatformBackup"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "PlatformBackupListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformBackup"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "PlatformBackupStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlatformBackupStatus"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "MonitoringChannelInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "provider": {
            "type": "string",
            "enum": [
              "dingtalk",
              "wecom",
              "feishu"
            ]
          },
          "security": {
            "type": "string",
            "enum": [
              "signature",
              "keyword",
              "none"
            ]
          },
          "keyword": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "webhook": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "name",
          "provider",
          "security",
          "keyword",
          "enabled",
          "description",
          "webhook",
          "secret"
        ]
      },
      "MonitoringChannel": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "provider": {
            "type": "string",
            "enum": [
              "dingtalk",
              "wecom",
              "feishu"
            ]
          },
          "security": {
            "type": "string",
            "enum": [
              "signature",
              "keyword",
              "none"
            ]
          },
          "keyword": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_label": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "name",
          "provider",
          "security",
          "keyword",
          "enabled",
          "description",
          "id",
          "endpoint_label",
          "created_at",
          "updated_at"
        ]
      },
      "MonitoringRuleInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "target_type": {
            "type": "string",
            "enum": [
              "host",
              "instance"
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "cpu_usage",
              "memory_usage",
              "storage_usage",
              "offline"
            ]
          },
          "operator": {
            "type": "string",
            "enum": [
              "gt",
              "gte",
              "lt",
              "lte",
              "eq"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "hold_seconds": {
            "type": "integer"
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              300
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "target_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "tenant_id",
          "name",
          "target_type",
          "metric",
          "operator",
          "threshold",
          "hold_seconds",
          "interval_seconds",
          "severity",
          "enabled",
          "description",
          "target_ids",
          "channel_ids"
        ]
      },
      "MonitoringRule": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "target_type": {
            "type": "string",
            "enum": [
              "host",
              "instance"
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "cpu_usage",
              "memory_usage",
              "storage_usage",
              "offline"
            ]
          },
          "operator": {
            "type": "string",
            "enum": [
              "gt",
              "gte",
              "lt",
              "lte",
              "eq"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "hold_seconds": {
            "type": "integer"
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              300
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "target_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "next_evaluation": {
            "type": "string",
            "format": "date-time"
          },
          "evaluated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "evaluation_state": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "tenant_id",
          "name",
          "target_type",
          "metric",
          "operator",
          "threshold",
          "hold_seconds",
          "interval_seconds",
          "severity",
          "enabled",
          "description",
          "target_ids",
          "channel_ids",
          "id",
          "next_evaluation",
          "evaluated_at",
          "evaluation_state",
          "error",
          "created_at",
          "updated_at",
          "deleted_at"
        ]
      },
      "MonitoringAlert": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "rule_id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "rule_name": {
            "type": "string"
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_name": {
            "type": "string"
          },
          "target_type": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "threshold": {
            "type": "number"
          },
          "value": {
            "type": "number",
            "nullable": true
          },
          "condition_since": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "firing",
              "resolved"
            ]
          },
          "acknowledged": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "actor": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "actor",
                "note",
                "action",
                "at"
              ]
            }
          },
          "fired_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_sample_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_seen": {
            "type": "string",
            "format": "date-time"
          },
          "resolution": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "rule_id",
          "tenant_id",
          "rule_name",
          "target_id",
          "target_name",
          "target_type",
          "metric",
          "severity",
          "threshold",
          "value",
          "condition_since",
          "state",
          "acknowledged",
          "note",
          "history",
          "fired_at",
          "resolved_at",
          "last_sample_at",
          "last_seen",
          "resolution",
          "created_at"
        ]
      },
      "MonitoringNotification": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel_name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "alert_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "event": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "retrying",
              "sent",
              "failed",
              "skipped"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "next_attempt": {
            "type": "string",
            "format": "date-time"
          },
          "last_error": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "channel_id",
          "channel_name",
          "provider",
          "tenant_id",
          "alert_id",
          "event",
          "title",
          "body",
          "state",
          "attempts",
          "next_attempt",
          "last_error",
          "created_at",
          "sent_at"
        ]
      },
      "MonitoringTarget": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "tenant_id",
          "type"
        ]
      },
      "MonitoringStatus": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "running": {
            "type": "boolean"
          },
          "metrics_configured": {
            "type": "boolean"
          },
          "notifications_configured": {
            "type": "boolean"
          }
        },
        "required": [
          "running",
          "metrics_configured",
          "notifications_configured"
        ]
      },
      "MonitoringAckInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "note": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "note"
        ]
      },
      "MonitoringQueued": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ]
      },
      "MonitoringChannelListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringChannel"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "MonitoringRuleListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringRule"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "MonitoringAlertListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringAlert"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "MonitoringNotificationListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringNotification"
            }
          },
          "request_id": {
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "request_id",
          "meta"
        ]
      },
      "MonitoringTargetListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringTarget"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "MonitoringChannelResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MonitoringChannel"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "MonitoringRuleResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MonitoringRule"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "MonitoringStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MonitoringStatus"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "MonitoringQueuedResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MonitoringQueued"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "MetalDisk": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "serial": {
            "type": "string"
          },
          "wwn": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "serial",
          "wwn",
          "size_bytes",
          "model"
        ],
        "additionalProperties": false
      },
      "MetalRootDevice": {
        "type": "object",
        "properties": {
          "serial": {
            "type": "string"
          },
          "wwn": {
            "type": "string"
          }
        },
        "required": [
          "serial",
          "wwn"
        ],
        "additionalProperties": false
      },
      "MetalHardware": {
        "type": "object",
        "properties": {
          "architecture": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mib": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "serial": {
            "type": "string"
          },
          "system_uuid": {
            "type": "string"
          },
          "disks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalDisk"
            }
          }
        },
        "required": [
          "architecture",
          "vcpus",
          "memory_mib",
          "model",
          "serial",
          "system_uuid",
          "disks"
        ],
        "additionalProperties": false
      },
      "MetalPort": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "mac": {
            "type": "string"
          },
          "pxe_enabled": {
            "type": "boolean"
          },
          "switch_port": {
            "type": "string"
          },
          "vlan_id": {
            "type": "integer"
          }
        },
        "required": [
          "name",
          "mac",
          "pxe_enabled",
          "switch_port"
        ],
        "additionalProperties": false
      },
      "MetalNodeInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "cluster_id": {
            "type": "string"
          },
          "bmc_address": {
            "type": "string"
          },
          "bmc_protocol": {
            "type": "string",
            "enum": [
              "redfish",
              "ipmi"
            ]
          },
          "bmc_username": {
            "type": "string"
          },
          "bmc_password": {
            "type": "string",
            "writeOnly": true
          },
          "bmc_fingerprint": {
            "type": "string"
          },
          "system_id": {
            "type": "string"
          },
          "boot_mode": {
            "type": "string",
            "enum": [
              "uefi",
              "bios"
            ]
          },
          "resource_class": {
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/MetalHardware"
          },
          "root_device": {
            "$ref": "#/components/schemas/MetalRootDevice"
          },
          "ports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalPort"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "bmc_cipher_suite": {
            "type": "integer",
            "enum": [
              3,
              17
            ],
            "default": 17
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "bmc_address",
          "bmc_protocol",
          "bmc_username",
          "boot_mode",
          "ports"
        ],
        "additionalProperties": false
      },
      "MetalNode": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "cluster_id": {
            "type": "string"
          },
          "bmc_address": {
            "type": "string"
          },
          "bmc_protocol": {
            "type": "string",
            "enum": [
              "redfish",
              "ipmi"
            ]
          },
          "bmc_username": {
            "type": "string"
          },
          "bmc_fingerprint": {
            "type": "string"
          },
          "system_id": {
            "type": "string"
          },
          "boot_mode": {
            "type": "string",
            "enum": [
              "uefi",
              "bios"
            ]
          },
          "resource_class": {
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/MetalHardware"
          },
          "root_device": {
            "$ref": "#/components/schemas/MetalRootDevice"
          },
          "ports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalPort"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "power_state": {
            "type": "string",
            "enum": [
              "on",
              "off",
              "unknown"
            ]
          },
          "last_error": {
            "type": "string"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "tenant_id": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "allocation_id": {
            "type": "string"
          },
          "availability_zone_name": {
            "type": "string"
          },
          "region_id": {
            "type": "string",
            "format": "uuid"
          },
          "credential_configured": {
            "type": "boolean"
          },
          "bmc_cipher_suite": {
            "type": "integer",
            "enum": [
              3,
              17
            ],
            "default": 17
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "bmc_address",
          "bmc_protocol",
          "bmc_username",
          "boot_mode",
          "resource_class",
          "properties",
          "root_device",
          "ports",
          "tags",
          "description",
          "id",
          "state",
          "power_state",
          "last_error",
          "last_seen",
          "created_at",
          "updated_at",
          "availability_zone_name",
          "region_id",
          "credential_configured"
        ],
        "additionalProperties": false
      },
      "MetalFlavorInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "resource_class": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mib": {
            "type": "integer"
          },
          "disk_gib": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "resource_class",
          "vcpus",
          "memory_mib",
          "disk_gib",
          "enabled"
        ],
        "additionalProperties": false
      },
      "MetalFlavor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "resource_class": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mib": {
            "type": "integer"
          },
          "disk_gib": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "resource_class",
          "vcpus",
          "memory_mib",
          "disk_gib",
          "enabled"
        ],
        "additionalProperties": false
      },
      "MetalImage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "os": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "architecture": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "firmware": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "nullable": true
          },
          "compatible": {
            "type": "boolean"
          },
          "source_available": {
            "type": "boolean"
          },
          "sha256": {
            "type": "string"
          },
          "min_disk_gib": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "os",
          "version",
          "architecture",
          "format",
          "firmware",
          "enabled",
          "compatible",
          "source_available",
          "sha256",
          "min_disk_gib"
        ],
        "additionalProperties": false
      },
      "MetalAllocationInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "node_id": {
            "type": "string",
            "format": "uuid"
          },
          "image_id": {
            "type": "string",
            "format": "uuid"
          },
          "flavor_id": {
            "type": "string",
            "format": "uuid"
          },
          "pool_id": {
            "type": "string",
            "format": "uuid"
          },
          "requested_ip": {
            "type": "string"
          },
          "port_id": {
            "type": "string",
            "format": "uuid"
          },
          "hostname": {
            "type": "string"
          },
          "ssh_key_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "confirm_node": {
            "type": "string"
          },
          "confirm_disk": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "availability_zone_id",
          "node_id",
          "image_id",
          "flavor_id",
          "pool_id",
          "port_id",
          "hostname",
          "ssh_key_ids",
          "confirm_node",
          "confirm_disk"
        ],
        "additionalProperties": false
      },
      "MetalAllocation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "node_id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "image_id": {
            "type": "string",
            "format": "uuid"
          },
          "flavor_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "pool_id": {
            "type": "string",
            "format": "uuid"
          },
          "ip": {
            "type": "string"
          },
          "capacity": {
            "$ref": "#/components/schemas/MetalHardware"
          },
          "state": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "node_name": {
            "type": "string"
          },
          "power_state": {
            "type": "string"
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "availability_zone_name": {
            "type": "string"
          },
          "region_id": {
            "type": "string",
            "format": "uuid"
          },
          "image_name": {
            "type": "string"
          },
          "image_os": {
            "type": "string"
          },
          "flavor_name": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "root_device": {
            "$ref": "#/components/schemas/MetalRootDevice"
          }
        },
        "required": [
          "id",
          "node_id",
          "tenant_id",
          "image_id",
          "flavor_id",
          "name",
          "hostname",
          "pool_id",
          "ip",
          "capacity",
          "state",
          "error",
          "created_at",
          "updated_at",
          "node_name",
          "power_state",
          "availability_zone_id",
          "availability_zone_name",
          "region_id",
          "image_name",
          "image_os",
          "flavor_name",
          "tenant_name",
          "root_device"
        ],
        "additionalProperties": false
      },
      "MetalEvent": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string"
          },
          "progress": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "at",
          "message",
          "progress",
          "state"
        ],
        "additionalProperties": false
      },
      "MetalTask": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "node_id": {
            "type": "string",
            "format": "uuid"
          },
          "allocation_id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "stage": {
            "type": "string"
          },
          "progress": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalEvent"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "node_id",
          "kind",
          "state",
          "stage",
          "progress",
          "message",
          "events",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "MetalAction": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "verify",
              "inspect",
              "power_on",
              "power_off",
              "power_reset",
              "clean",
              "maintenance",
              "retire",
              "reinstall",
              "release"
            ]
          },
          "confirm_node": {
            "type": "string"
          },
          "confirm_disk": {
            "type": "string"
          },
          "image_id": {
            "type": "string"
          },
          "ssh_key_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "action"
        ],
        "additionalProperties": false
      },
      "MetalImageInput": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "additionalProperties": false
      },
      "MetalNodeResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MetalNode"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalNodeListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalNode"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalFlavorResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MetalFlavor"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalFlavorListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalFlavor"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalImageResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MetalImage"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalImageListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalImage"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalAllocationResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MetalAllocation"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalAllocationListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalAllocation"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalTaskResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MetalTask"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalTaskListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalTask"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MetalCandidate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "availability_zone_id",
          "boot_mode",
          "resource_class",
          "properties",
          "root_device",
          "ports"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "availability_zone_id": {
            "type": "string",
            "format": "uuid"
          },
          "boot_mode": {
            "type": "string",
            "enum": [
              "uefi",
              "bios"
            ]
          },
          "resource_class": {
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/MetalHardware"
          },
          "root_device": {
            "$ref": "#/components/schemas/MetalRootDevice"
          },
          "ports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalPort"
            }
          }
        },
        "additionalProperties": false
      },
      "MetalCandidateListResponse": {
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetalCandidate"
            }
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "MetalCredentials": {
        "type": "object",
        "required": [
          "username",
          "cipher"
        ],
        "additionalProperties": false,
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string",
            "writeOnly": true
          },
          "fingerprint": {
            "type": "string"
          },
          "cipher": {
            "type": "integer",
            "enum": [
              3,
              17
            ]
          }
        }
      },
      "InstanceAssignmentInput": {
        "type": "object",
        "required": [
          "user_id"
        ],
        "additionalProperties": false,
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        }
      },
      "InstanceAssignee": {
        "type": "object",
        "required": [
          "id",
          "username",
          "display_name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "InstanceAssigneeListResponse": {
        "type": "object",
        "required": [
          "data",
          "request_id",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstanceAssignee"
            }
          },
          "meta": {
            "type": "object",
            "required": [
              "total"
            ],
            "properties": {
              "total": {
                "type": "integer"
              },
              "page": {
                "type": "integer"
              },
              "page_size": {
                "type": "integer"
              }
            }
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "InstanceReinstallImage": {
        "type": "object",
        "required": [
          "id",
          "name",
          "os",
          "login_user",
          "cloud_init_enabled"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "os": {
            "type": "string"
          },
          "login_user": {
            "type": "string"
          },
          "cloud_init_enabled": {
            "type": "boolean"
          }
        }
      },
      "InstanceReinstallImagesResponse": {
        "type": "object",
        "required": [
          "data",
          "request_id"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstanceReinstallImage"
            }
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "PoolHost": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "bridge_name": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "bridge_name",
          "ready"
        ]
      },
      "PoolHostsResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PoolHost"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "PoolReservationInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ip": {
            "type": "string",
            "format": "ipv4"
          },
          "note": {
            "type": "string",
            "maxLength": 256
          }
        },
        "required": [
          "ip"
        ]
      },
      "PoolUplink": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "provider_name": {
            "type": "string"
          },
          "bridge_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "connected_hosts": {
            "type": "integer"
          },
          "total_hosts": {
            "type": "integer"
          }
        },
        "required": [
          "provider_name",
          "bridge_names",
          "connected_hosts",
          "total_hosts"
        ]
      },
      "PoolUplinksResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PoolUplink"
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "request_id"
        ]
      },
      "ResourceRateLimits": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "upload_limit_kbps": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4294967295,
            "nullable": true,
            "description": "上行带宽上限，单位 kbps。对应实例发出的流量。空值表示不限速。"
          },
          "download_limit_kbps": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4294967295,
            "nullable": true,
            "description": "下行带宽上限，单位 kbps。对应实例接收的流量。空值表示不限速。"
          },
          "max_iops": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "nullable": true,
            "description": "读写合计 IOPS 上限。空值表示不限速。"
          },
          "max_bytes_per_second": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 1099511627776,
            "nullable": true,
            "description": "读写合计吞吐量上限，单位字节/秒。空值表示不限速。"
          }
        }
      }
    },
    "securitySchemes": {
      "SessionAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-virt_session",
        "description": "PostgreSQL 服务端会话；生产 HttpOnly / Secure / SameSite=Lax / Path=/。仅显式回环 HTTP 开发模式使用 virt_dev_session，不能用于公网。"
      },
      "PreAuthSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-virt_pre_auth",
        "description": "登录 CSRF 绑定的短期预认证会话，成功登录后原子消费。回环 HTTP 开发模式名为 virt_dev_pre_auth。"
      },
      "ClientBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "第三方 API 客户端的独立可撤销凭据；不隐含 JWT"
      }
    }
  }
}
