Table: azure_sql_server_advanced_threat_protection_settings

This table shows data for Azure SQL Server Advanced Threat Protection Settings.

https://learn.microsoft.com/en-us/rest/api/sql/2021-11-01/server-advanced-threat-protection-settings/list-by-server?tabs=HTTP#advancedthreatprotectionstate (opens in a new tab)

The primary key for this table is id.

Relations

This table depends on azure_sql_servers.

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
subscription_idutf8
propertiesjson
id (PK)utf8
nameutf8
system_datajson
typeutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

Ensure that Advanced Threat Protection (ATP) on a SQL server is set to "Enabled" (Automated)

SELECT
  'Ensure that Advanced Threat Protection (ATP) on a SQL server is set to "Enabled" (Automated)'
    AS title,
  s.subscription_id,
  s.id AS server_id,
  CASE
  WHEN atp.properties->>'state' IS DISTINCT FROM 'Enabled' THEN 'fail'
  ELSE 'pass'
  END
FROM
  azure_sql_servers AS s
  JOIN azure_sql_server_advanced_threat_protection_settings AS atp ON
      s._cq_id = atp._cq_parent_id;