{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-synapse-analytics/json-schema/microsoft-azure-synapse-analytics-sql-pool-security-alert-policy-schema.json",
  "title": "SqlPoolSecurityAlertPolicy",
  "description": "A Sql pool security alert policy.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-synapse-analytics-sqlpools-securityalertpolicies-api-openapi.yml#/components/schemas/SqlPoolSecurityAlertPolicy",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/SecurityAlertPolicyProperties",
      "description": "Resource properties.",
      "x-ms-client-flatten": true
    }
  },
  "$defs": {
    "ProxyResource": {
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "SecurityAlertPolicyProperties": {
      "description": "Properties of a security alert policy.",
      "required": [
        "state"
      ],
      "type": "object",
      "properties": {
        "state": {
          "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific Sql pool.",
          "enum": [
            "New",
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "SecurityAlertPolicyState",
            "modelAsString": false
          }
        },
        "disabledAlerts": {
          "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action",
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "emailAddresses": {
          "description": "Specifies an array of e-mail addresses to which the alert is sent.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "emailAccountAdmins": {
          "description": "Specifies that the alert is sent to the account administrators.",
          "type": "boolean"
        },
        "storageEndpoint": {
          "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.",
          "type": "string"
        },
        "storageAccountAccessKey": {
          "description": "Specifies the identifier key of the Threat Detection audit storage account.",
          "type": "string"
        },
        "retentionDays": {
          "format": "int32",
          "description": "Specifies the number of days to keep in the Threat Detection audit logs.",
          "type": "integer"
        },
        "creationTime": {
          "format": "date-time",
          "description": "Specifies the UTC creation time of the policy.",
          "type": "string",
          "readOnly": true
        }
      }
    }
  }
}