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

NameDatatypeDescription
creation_timetextfield from the properties object
disabled_alertstextfield from the properties object
email_account_adminstextfield from the properties object
email_addressestextfield from the properties object
managedInstanceNametextfield from the properties object
resourceGroupNametextfield from the properties object
retention_daystextfield from the properties object
securityAlertPolicyNametextfield from the properties object
statetextfield from the properties object
storage_account_access_keytextfield from the properties object
storage_endpointtextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTmanagedInstanceName, resourceGroupName, securityAlertPolicyName, subscriptionIdGet a managed server's threat detection policy.
create_or_updateINSERTmanagedInstanceName, resourceGroupName, securityAlertPolicyName, subscriptionIdCreates or updates a threat detection policy.

SELECT examples

Get a managed server's threat detection policy.

SELECT
creation_time,
disabled_alerts,
email_account_admins,
email_addresses,
managedInstanceName,
resourceGroupName,
retention_days,
securityAlertPolicyName,
state,
storage_account_access_key,
storage_endpoint,
subscriptionId,
system_data
FROM azure.sql.vw_managed_server_security_alert_policies
WHERE managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND securityAlertPolicyName = '{{ securityAlertPolicyName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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