server_security_alert_policies
Creates, updates, deletes, gets or lists a server_security_alert_policies
resource.
Overview
Name | server_security_alert_policies |
Type | Resource |
Id | azure.sql.server_security_alert_policies |
Fields
- vw_server_security_alert_policies
- server_security_alert_policies
Name | Datatype | Description |
---|---|---|
creation_time | text | field from the properties object |
disabled_alerts | text | field from the properties object |
email_account_admins | text | field from the properties object |
email_addresses | text | field from the properties object |
resourceGroupName | text | field from the properties object |
retention_days | text | field from the properties object |
securityAlertPolicyName | text | field from the properties object |
serverName | text | field from the properties object |
state | text | field from the properties object |
storage_account_access_key | text | field from the properties object |
storage_endpoint | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a security alert policy. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, securityAlertPolicyName, serverName, subscriptionId | Get a server's security alert policy. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | Get the server's threat detection policies. |
create_or_update | INSERT | resourceGroupName, securityAlertPolicyName, serverName, subscriptionId | Creates or updates a threat detection policy. |
SELECT
examples
Get the server's threat detection policies.
- vw_server_security_alert_policies
- server_security_alert_policies
SELECT
creation_time,
disabled_alerts,
email_account_admins,
email_addresses,
resourceGroupName,
retention_days,
securityAlertPolicyName,
serverName,
state,
storage_account_access_key,
storage_endpoint,
subscriptionId,
system_data
FROM azure.sql.vw_server_security_alert_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties,
systemData
FROM azure.sql.server_security_alert_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new server_security_alert_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.server_security_alert_policies (
resourceGroupName,
securityAlertPolicyName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ securityAlertPolicyName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: state
value: string
- name: disabledAlerts
value:
- string
- name: emailAddresses
value:
- string
- name: emailAccountAdmins
value: boolean
- name: storageEndpoint
value: string
- name: storageAccountAccessKey
value: string
- name: retentionDays
value: integer
- name: creationTime
value: string