{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-express-route/json-schema/microsoft-azure-express-route-migrate-express-route-circuit-health-check-response-schema.json",
  "title": "MigrateExpressRouteCircuitHealthCheckResponse",
  "description": "Response for express route circuit migration health check and migration operations.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-express-route-expressroutecrossconnections-api-openapi.yml#/components/schemas/MigrateExpressRouteCircuitHealthCheckResponse",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "The overall status of the migration operation."
    },
    "phase": {
      "type": "string",
      "description": "The current phase of the migration operation."
    },
    "failureReason": {
      "type": "string",
      "description": "The failure reason if the migration operation failed."
    },
    "newSTag": {
      "type": "string",
      "description": "The new service tag assigned after migration."
    },
    "preparedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the migration was prepared."
    },
    "prepareExpiryTime": {
      "type": "string",
      "format": "date-time",
      "description": "The expiry time for the prepare phase."
    },
    "newCrossConnectionUrl": {
      "type": "string",
      "format": "uri",
      "description": "The URL of the new cross connection after migration."
    },
    "shouldRollback": {
      "type": "boolean",
      "description": "Indicates whether rollback should be performed."
    },
    "details": {
      "$ref": "#/$defs/MigrateExpressRouteCircuitHealthCheckDetails",
      "description": "Detailed health check information for migration."
    }
  },
  "$defs": {
    "Metric": {
      "type": "object",
      "description": "Metric entry for migration peering statistics.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The metric name."
        },
        "value": {
          "type": "number",
          "format": "double",
          "description": "The metric value."
        },
        "unit": {
          "type": "string",
          "description": "The metric unit."
        }
      }
    },
    "MigrateExpressRouteCircuitHealthCheckDetails": {
      "type": "object",
      "description": "Detailed migration health information.",
      "properties": {
        "portMigrationInfos": {
          "type": "array",
          "description": "Per-port migration details.",
          "items": {
            "$ref": "#/$defs/PortMigrationInfo"
          },
          "x-ms-identifiers": [
            "portId"
          ]
        }
      }
    },
    "PeeringHealth": {
      "type": "object",
      "description": "Health information for a peering connection.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of peering (for example, Private, Microsoft, Public)."
        },
        "statsCurrent": {
          "$ref": "#/$defs/PeeringStats",
          "description": "The current peering statistics."
        },
        "statsAtPrepare": {
          "$ref": "#/$defs/PeeringStats",
          "description": "The peering statistics captured at prepare phase."
        }
      }
    },
    "PeeringStats": {
      "type": "object",
      "description": "Statistical information for a peering connection.",
      "properties": {
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when these statistics were captured."
        },
        "metrics": {
          "type": "array",
          "description": "The collection of peering metrics.",
          "items": {
            "$ref": "#/$defs/Metric"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "PortMigrationInfo": {
      "type": "object",
      "description": "Information about a port migration status.",
      "properties": {
        "portId": {
          "type": "string",
          "description": "The identifier of the port being migrated."
        },
        "status": {
          "type": "string",
          "description": "The migration status for the port."
        },
        "phase": {
          "type": "string",
          "description": "The current migration phase for the port."
        },
        "failureReason": {
          "type": "string",
          "description": "The reason for failure if migration failed for the port."
        },
        "peerings": {
          "type": "array",
          "description": "The peering health details for the port.",
          "items": {
            "$ref": "#/$defs/PeeringHealth"
          },
          "x-ms-identifiers": [
            "type"
          ]
        },
        "sourcePortId": {
          "type": "string",
          "description": "The source port identifier before migration."
        },
        "sourcePortStats": {
          "$ref": "#/$defs/SourcePortStats",
          "description": "The source port statistics before migration."
        }
      }
    },
    "SourcePortStats": {
      "type": "object",
      "description": "Statistics from the source port before migration.",
      "properties": {
        "peerings": {
          "type": "array",
          "description": "The peering health information from the source port.",
          "items": {
            "$ref": "#/$defs/PeeringHealth"
          },
          "x-ms-identifiers": [
            "type"
          ]
        }
      }
    }
  }
}