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

The following fields are returned by SELECT queries:

Successfully retrieved the server advanced threat protection settings.

NameDatatypeDescription
propertiesobjectAdvanced Threat Protection properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serverName, threatProtectionNameGet a server's Advanced Threat Protection settings.
list_by_serverselectsubscriptionId, resourceGroupName, serverNameGet a list of server's Threat Protection state.
create_or_updateinsertsubscriptionId, resourceGroupName, serverName, threatProtectionNameCreates or updates a server's Advanced Threat Protection settings.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serverNamestringThe name of the server.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
threatProtectionNamestringThe name of the Threat Protection state.

SELECT examples

Get a server's Advanced Threat Protection settings.

SELECT
properties
FROM azure.postgresql.server_threat_protection_settings
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND threatProtectionName = '{{ threatProtectionName }}' -- required
;

INSERT examples

Creates or updates a server's Advanced Threat Protection settings.

INSERT INTO azure.postgresql.server_threat_protection_settings (
data__properties,
subscriptionId,
resourceGroupName,
serverName,
threatProtectionName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ threatProtectionName }}'
RETURNING
properties
;