{
  "type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
  "apiVersion": "2025-09-01",
  "name": "ValimailEnforceEventsConnector",
  "location": "{{workspace-location}}",
  "kind": "Customizable",
  "properties": {
    "connectorUiConfig": {
      "id": "ValimailEnforceEventsConnector",
      "title": "Valimail Enforce Configuration Events",
      "publisher": "Valimail",
      "descriptionMarkdown": "The [Valimail Configuration Events](https://support.valimail.com/en/articles/13133390-microsoft-sentinel) data connector allows ingesting email domain's configuration events from the Valimail's Reporting API into Microsoft Sentinel. The data connector is built on Microsoft Sentinel Codeless Connector Platform.",
      "graphQueries": [
        {
          "metricName": "Valimail Events received",
          "legend": "Valimail Enforce Connector Alerts",
          "baseQuery": "ValimailEnforceEvents_CL"
        }
      ],
      "sampleQueries": [
        {
          "description": "All events logs",
          "query": "ValimailEnforceEvents_CL| take 10"
        }
      ],
      "dataTypes": [
        {
          "name": "ValimailEnforceEvents_CL",
          "lastDataReceivedQuery": "ValimailEnforceEvents_CL | summarize Time = max(TimeGenerated) | where isnotempty(Time)"
        }
      ],
      "connectivityCriteria": [
        {
          "type": "HasDataConnectors"
        }
      ],
      "availability": {
        "status": 1,
        "isPreview": false
      },
      "permissions": {
        "resourceProvider": [
          {
            "provider": "Microsoft.OperationalInsights/workspaces",
            "permissionsDisplayText": "Read and Write permissions are required.",
            "providerDisplayName": "Workspace",
            "scope": "Workspace",
            "requiredPermissions": {
              "read": true,
              "write": true,
              "delete": true,
              "action": false
            }
          }
        ]
      },
      "instructionSteps": [
        {
          "instructions": [
            {
              "type": "Markdown",
              "parameters": {
                "content": "#### Configuration steps for the Valimail Events API \n Follow the instructions in the [guide to generate a set of Reporting API credentials](https://support.valimail.com/en/articles/11322142-api-key-self-service). Store the created Client ID and the App ID keys."
              }
            },
            {
              "type": "Textbox",
              "parameters": {
                "description": "The slug will be the string after /app/ in the Valimail's URL once you are logged in. \n If you are unsure of your account slug, please reach out to support and we will be more than happy to help you find it.",
                "label": "Client Account Slug",
                "placeholder": "Account slug",
                "type": "text",
                "name": "accountslug"
              }
            },
            {
              "type": "Textbox",
              "parameters": {
                "label": "API Client Id",
                "placeholder": "Client Id Credential",
                "type": "password",
                "name": "clientid"
              }
            },
            {
              "type": "Textbox",
              "parameters": {
                "label": "API App Id",
                "placeholder": "App Id Credential",
                "type": "password",
                "name": "appid"
              }
            },
            {
              "parameters": {
                "label": "toggle",
                "name": "toggle"
              },
              "type": "ConnectionToggleButton"
            }
          ]
        }
      ],
      "isConnectivityCriteriasMatchSome": false
    }
  }
}
