{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-networking-services/json-schema/azure-networking-services-bastion-active-session-list-result-schema.json",
  "title": "BastionActiveSessionListResult",
  "description": "Response for GetActiveSessions.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-networking-services-bastionhosts-api-openapi.yml#/components/schemas/BastionActiveSessionListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The BastionActiveSession items on this page",
      "items": {
        "$ref": "#/$defs/BastionActiveSession"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "BastionActiveSession": {
      "type": "object",
      "description": "The session detail for a target.",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "A unique id for the session.",
          "readOnly": true
        },
        "startTime": {
          "description": "The time when the session started.",
          "readOnly": true
        },
        "targetSubscriptionId": {
          "type": "string",
          "description": "The subscription id for the target virtual machine.",
          "readOnly": true
        },
        "resourceType": {
          "type": "string",
          "description": "The type of the resource.",
          "readOnly": true
        },
        "targetHostName": {
          "type": "string",
          "description": "The host name of the target.",
          "readOnly": true
        },
        "targetResourceGroup": {
          "type": "string",
          "description": "The resource group of the target.",
          "readOnly": true
        },
        "userName": {
          "type": "string",
          "description": "The user name who is active on this session.",
          "readOnly": true
        },
        "targetIpAddress": {
          "type": "string",
          "description": "The IP Address of the target.",
          "readOnly": true
        },
        "protocol": {
          "$ref": "#/$defs/BastionConnectProtocol",
          "description": "The protocol used to connect to the target.",
          "readOnly": true
        },
        "targetResourceId": {
          "type": "string",
          "description": "The resource id of the target.",
          "readOnly": true
        },
        "sessionDurationInMins": {
          "type": "number",
          "format": "float",
          "description": "Duration in mins the session has been active.",
          "readOnly": true
        }
      }
    },
    "BastionConnectProtocol": {
      "type": "string",
      "description": "The protocol used to connect to the target.",
      "enum": [
        "SSH",
        "RDP"
      ],
      "x-ms-enum": {
        "name": "BastionConnectProtocol",
        "modelAsString": true,
        "values": [
          {
            "name": "SSH",
            "value": "SSH",
            "description": "SSH"
          },
          {
            "name": "RDP",
            "value": "RDP",
            "description": "RDP"
          }
        ]
      }
    }
  }
}