{
  "$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/8d2b6f4c-1a37-4e9b-b5c8-7f0e3a2d9c14')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/8d2b6f4c-1a37-4e9b-b5c8-7f0e3a2d9c14')]",
      "properties": {
        "alertRuleTemplateName": "8d2b6f4c-1a37-4e9b-b5c8-7f0e3a2d9c14",
        "customDetails": {
          "AffectedSystems": "AffectedSystems",
          "Environment": "Environment",
          "IssueStatus": "IssueStatus",
          "PolicyCategories": "PolicyCategories",
          "PolicyName": "PolicyName",
          "RemediationSteps": "RemediationSteps"
        },
        "description": "'Creates an incident when Gambit Security reports an Active, High-severity policy issue in Microsoft Sentinel.'\n",
        "displayName": "Gambit Security - Critical Policy Issue Promotion",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "ResourceDisplayId",
                "identifier": "HostName"
              }
            ]
          },
          {
            "entityType": "AzureResource",
            "fieldMappings": [
              {
                "columnName": "ResourceDisplayId",
                "identifier": "ResourceId"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "AlertPerResult"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": false,
            "lookbackDuration": "PT5H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GambitSecurity/Analytic%20Rules/GambitCriticalIssuePromotion.yaml",
        "query": "GambitPoliciesIssues\n| where State == \"Active\" and Severity == \"High\"\n",
        "queryFrequency": "P1D",
        "queryPeriod": "P1D",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Impact"
        ],
        "techniques": [
          "T1490"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
