{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://appdynamics.com/schemas/appdynamics/database-collector.json",
  "title": "AppDynamics Database Collector",
  "description": "Schema representing an AppDynamics Database Visibility collector configuration for monitoring database instances.",
  "type": "object",
  "required": ["name", "type", "hostname", "port", "username"],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The internal configuration ID for the database collector."
    },
    "name": {
      "type": "string",
      "description": "The display name for the database collector.",
      "minLength": 1,
      "maxLength": 255
    },
    "type": {
      "type": "string",
      "description": "The type of database being monitored.",
      "enum": [
        "MYSQL",
        "ORACLE",
        "MSSQL",
        "POSTGRESQL",
        "MONGODB",
        "SYBASE",
        "DB2",
        "AURORA"
      ]
    },
    "hostname": {
      "type": "string",
      "description": "The hostname or IP address of the database server.",
      "minLength": 1
    },
    "port": {
      "type": "integer",
      "description": "The port number for the database connection.",
      "minimum": 1,
      "maximum": 65535
    },
    "username": {
      "type": "string",
      "description": "The username for authenticating with the database.",
      "minLength": 1
    },
    "password": {
      "type": "string",
      "description": "The password for authenticating with the database. Only used in create and update requests."
    },
    "databaseName": {
      "type": "string",
      "description": "The name of the specific database to monitor."
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the database collector is enabled and actively monitoring.",
      "default": true
    },
    "agentName": {
      "type": "string",
      "description": "The name of the Database Agent responsible for this collector."
    },
    "excludedSchemas": {
      "type": "array",
      "description": "List of schema names to exclude from monitoring.",
      "items": {
        "type": "string"
      }
    }
  }
}
