{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-agent-schema.json",
  "title": "Agent",
  "description": "The Agent resource.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-agents-api-openapi.yml#/components/schemas/Agent",
  "type": "object",
  "properties": {
    "properties": {
      "x-ms-client-flatten": true,
      "$ref": "#/$defs/AgentProperties"
    },
    "systemData": {
      "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
      "description": "Resource system metadata."
    }
  },
  "required": [
    "properties"
  ],
  "allOf": [
    {
      "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "AgentProperties": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "A description for the Agent."
        },
        "agentVersion": {
          "type": "string",
          "description": "The Agent version.",
          "readOnly": true
        },
        "arcResourceId": {
          "type": "string",
          "description": "The fully qualified resource ID of the Hybrid Compute resource for the Agent.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "arcVmUuid": {
          "type": "string",
          "description": "The VM UUID of the Hybrid Compute resource for the Agent.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "agentStatus": {
          "description": "The Agent status.",
          "enum": [
            "Registering",
            "Offline",
            "Online",
            "Executing",
            "RequiresAttention",
            "Unregistering"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "AgentStatus",
            "modelAsString": true
          },
          "readOnly": true
        },
        "lastStatusUpdate": {
          "type": "string",
          "format": "date-time",
          "description": "The last updated time of the Agent status.",
          "readOnly": true
        },
        "localIPAddress": {
          "type": "string",
          "description": "Local IP address reported by the Agent.",
          "readOnly": true
        },
        "memoryInMB": {
          "type": "integer",
          "format": "int64",
          "description": "Available memory reported by the Agent, in MB.",
          "readOnly": true
        },
        "numberOfCores": {
          "type": "integer",
          "format": "int64",
          "description": "Available compute cores reported by the Agent.",
          "readOnly": true
        },
        "uptimeInSeconds": {
          "type": "integer",
          "format": "int64",
          "description": "Uptime of the Agent in seconds.",
          "readOnly": true
        },
        "errorDetails": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "description": "Error code reported by Agent"
            },
            "message": {
              "type": "string",
              "description": "Expanded description of reported error code"
            }
          },
          "readOnly": true
        },
        "provisioningState": {
          "description": "The provisioning state of this resource.",
          "enum": [
            "Succeeded"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "ProvisioningState",
            "modelAsString": true
          },
          "readOnly": true
        }
      },
      "required": [
        "arcResourceId",
        "arcVmUuid"
      ]
    }
  }
}