Skip to main content

managed_server_security_alert_policies

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

Overview

Namemanaged_server_security_alert_policies
TypeResource
Idazure.sql.managed_server_security_alert_policies

Fields

The following fields are returned by SELECT queries:

Successfully retrieved the managed server threat detection policy.

NameDatatypeDescription
propertiesobjectResource properties.
systemDataobjectSystemData of SecurityAlertPolicyResource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, managedInstanceName, securityAlertPolicyName, subscriptionIdGet a managed server's threat detection policy.
create_or_updateinsertresourceGroupName, managedInstanceName, securityAlertPolicyName, subscriptionIdCreates or updates a threat detection policy.

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
managedInstanceNamestringThe name of the managed instance.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
securityAlertPolicyNamestringThe name of the security alert policy.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Get a managed server's threat detection policy.

SELECT
properties,
systemData
FROM azure.sql.managed_server_security_alert_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND managedInstanceName = '{{ managedInstanceName }}' -- required
AND securityAlertPolicyName = '{{ securityAlertPolicyName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates a threat detection policy.

INSERT INTO azure.sql.managed_server_security_alert_policies (
data__properties,
resourceGroupName,
managedInstanceName,
securityAlertPolicyName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ managedInstanceName }}',
'{{ securityAlertPolicyName }}',
'{{ subscriptionId }}'
RETURNING
properties,
systemData
;