Skip to main content

managed_database_advanced_threat_protection_settings

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

Overview

Namemanaged_database_advanced_threat_protection_settings
TypeResource
Idazure.sql.managed_database_advanced_threat_protection_settings

Fields

NameDatatypeDescription
advancedThreatProtectionNametextfield from the properties object
creation_timetextfield from the properties object
databaseNametextfield from the properties object
managedInstanceNametextfield from the properties object
resourceGroupNametextfield 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, managedInstanceName, resourceGroupName, subscriptionIdGets a managed database's Advanced Threat Protection state.
list_by_databaseSELECTdatabaseName, managedInstanceName, resourceGroupName, subscriptionIdGets a list of managed database's Advanced Threat Protection states.
create_or_updateINSERTadvancedThreatProtectionName, databaseName, managedInstanceName, resourceGroupName, subscriptionIdCreates or updates a managed database's Advanced Threat Protection state.

SELECT examples

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

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

INSERT example

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

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