Skip to main content

server_threat_protection_settings

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

Overview

Nameserver_threat_protection_settings
TypeResource
Idazure.postgresql.server_threat_protection_settings

Fields

NameDatatypeDescription
creation_timetextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
threatProtectionNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serverName, subscriptionId, threatProtectionNameGet a server's Advanced Threat Protection settings.
list_by_serverSELECTresourceGroupName, serverName, subscriptionIdGet a list of server's Threat Protection state.
create_or_updateINSERTresourceGroupName, serverName, subscriptionId, threatProtectionNameCreates or updates a server's Advanced Threat Protection settings.

SELECT examples

Get a list of server's Threat Protection state.

SELECT
creation_time,
resourceGroupName,
serverName,
state,
subscriptionId,
threatProtectionName
FROM azure.postgresql.vw_server_threat_protection_settings
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.postgresql.server_threat_protection_settings (
resourceGroupName,
serverName,
subscriptionId,
threatProtectionName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ threatProtectionName }}',
'{{ properties }}'
;