{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/81404e99-ce27-45aa-aa19-a276a3d4c645')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/81404e99-ce27-45aa-aa19-a276a3d4c645')]",
      "properties": {
        "alertRuleTemplateName": "81404e99-ce27-45aa-aa19-a276a3d4c645",
        "customDetails": {
          "AlertID": "AlertID",
          "DE_Domain": "DE_Domain",
          "DE_DueDays": "DE_DueDays",
          "DE_ExpiryDate": "DE_ExpiryDate",
          "DE_TypeText": "DE_TypeText",
          "MappedSeverity": "Severity",
          "Service": "Service",
          "Status": "Status"
        },
        "description": "'Triggers when a monitored domain is about to expire. Expired domains risk service disruption, takeover, or misuse by adversaries.'\n",
        "displayName": "Cyble Vision Alerts Domain Expiry Alert",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "DNS",
            "fieldMappings": [
              {
                "columnName": "DE_Domain",
                "identifier": "DomainName"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "AlertPerResult"
        },
        "incidentConfiguration": {
          "alertDescriptionFormat": "The monitored domain is expiring soon. Expiry Date {{DE_ExpiryDate}}. Due in {{DE_DueDays}} days. Alert Type {{DE_TypeText}}. Immediate renewal is recommended to avoid service disruption or domain hijacking.\n",
          "alertDetailsOverride": null,
          "alertDisplayNameFormat": "Domain Expiration Imminent {{DE_Domain}}",
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": false,
            "lookbackDuration": "PT5H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cyble%20Vision/Analytic%20Rules/Alerts_domain_expiry_rule.yaml",
        "query": "Alerts_domain_expiry  \n| where Service == \"domain_expiry\" \n| extend MappedSeverity = Severity\n",
        "queryfrequency": "PT30M",
        "queryPeriod": "PT30M",
        "severity": "Low",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Impact"
        ],
        "techniques": [
          "T1499"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
