type: object
description: |
    A media-server registration — one row per `media_server_next` instance that
    has registered with `cloud_api`. Mirrors `cloud/src/Schemas.MediaServer`.
    Identifies where the server lives, current load, last-heartbeat freshness,
    and which rooms it's hosting.

    `activationStatus` is the only field admins typically mutate via
    `PUT /admin/network/media-server/{id}` — everything else is reported by the
    server itself.
required: [id, ipAddress, activationStatus]
properties:
    id: { type: string, description: Server-reported identifier. }
    version:
        type: string
        description: Media-server build version (independent of cloud_api's app version).
    createdAt:
        type: string
        format: date-time
        description: When the server first registered.
    lastHeartbeat:
        type: string
        format: date-time
        description: Most recent heartbeat from the server. Stale heartbeats imply `Unresponsive` status.
    activationStatus:
        type: string
        description: "`MediaServerActivationStatus` value — `Active`, `Disabled`, etc. Admin-mutable."
    ipAddress:
        type: string
        description: Public IP address.
    minPort:
        type: integer
        description: Lower bound of the UDP port range this server will use.
    maxPort:
        type: integer
        description: Upper bound of the UDP port range.
    isAccelerated:
        type: boolean
        description: Whether the server uses AWS Global Accelerator.
    region:
        type: [string, "null"]
        description: AWS region (when applicable).
    instanceId:
        type: [string, "null"]
        description: AWS EC2 instance id.
    instanceType:
        type: [string, "null"]
        description: "AWS instance type (e.g. `t2.xlarge`)."
    load:
        type: number
        description: Estimated load 0–100, server-reported.
    roomIds:
        type: array
        items: { type: string }
        description: Rooms currently hosted on this server.
example:
    id: "ms-us-west-2-04"
    version: "1.42.3"
    createdAt: "2026-04-22T10:14:00.000Z"
    lastHeartbeat: "2026-05-06T19:14:00.000Z"
    activationStatus: "Active"
    ipAddress: "203.0.113.40"
    minPort: 32000
    maxPort: 33000
    isAccelerated: true
    region: "us-west-2"
    instanceId: "i-0a1b2c3d4e5f6789"
    instanceType: "c6i.xlarge"
    load: 28
    roomIds: ["room:abc1234567", "room:def8901234"]
