Skip to main content

database_advanced_threat_protection_settings

Creates, updates, deletes, gets or lists a database_advanced_threat_protection_settings resource.

Overview

Namedatabase_advanced_threat_protection_settings
TypeResource
Idazure.sql.database_advanced_threat_protection_settings

Fields

NameDatatypeDescription
advancedThreatProtectionNametextfield from the properties object
creation_timetextfield from the properties object
databaseNametextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTadvancedThreatProtectionName, databaseName, resourceGroupName, serverName, subscriptionIdGets a database's Advanced Threat Protection state.
list_by_databaseSELECTdatabaseName, resourceGroupName, serverName, subscriptionIdGets a list of database's Advanced Threat Protection states.
create_or_updateINSERTadvancedThreatProtectionName, databaseName, resourceGroupName, serverName, subscriptionIdCreates or updates a database's Advanced Threat Protection state.

SELECT examples

Gets a list of database's Advanced Threat Protection states.

SELECT
advancedThreatProtectionName,
creation_time,
databaseName,
resourceGroupName,
serverName,
state,
subscriptionId,
system_data
FROM azure.sql.vw_database_advanced_threat_protection_settings
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new database_advanced_threat_protection_settings resource.

/*+ create */
INSERT INTO azure.sql.database_advanced_threat_protection_settings (
advancedThreatProtectionName,
databaseName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ advancedThreatProtectionName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;