{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-anomalies-whitelist-rule-schema.json",
  "title": "AnomaliesWhitelistRule",
  "description": "This object contains the complete definition of Anomalies Whitelist Rule",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-anomalies-ignorelist-rule-api-openapi.yml#/components/schemas/AnomaliesWhitelistRule",
  "required": [
    "name",
    "type"
  ],
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Unique id"
    },
    "accountId": {
      "type": "string",
      "description": "Harness account id"
    },
    "name": {
      "type": "string",
      "description": "Name"
    },
    "type": {
      "type": "string",
      "description": "Cloud provider type",
      "enum": [
        "AWS",
        "AZURE",
        "GCP",
        "CLUSTER"
      ]
    },
    "ruleSpec": {
      "$ref": "#/$defs/AnomaliesWhitelistRuleSpecDTO"
    },
    "whitelistedAnomalyCount": {
      "type": "integer",
      "description": "Number of whitelisted anomalies",
      "format": "int64"
    },
    "enabled": {
      "type": "boolean",
      "description": "Enabled"
    },
    "createdAt": {
      "type": "integer",
      "description": "Time at which the entity was created",
      "format": "int64"
    },
    "lastUpdatedAt": {
      "type": "integer",
      "description": "Time at which the entity was last updated",
      "format": "int64"
    },
    "createdBy": {
      "$ref": "#/$defs/EmbeddedUser"
    },
    "lastUpdatedBy": {
      "$ref": "#/$defs/EmbeddedUser"
    }
  },
  "$defs": {
    "AnomaliesWhitelistRuleSpecDTO": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "AWS",
            "AZURE",
            "GCP",
            "CLUSTER"
          ]
        }
      },
      "description": "Cloud specific whitelist rule configuration"
    },
    "EmbeddedUser": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "externalUserId": {
          "type": "string"
        }
      }
    }
  }
}