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_extras.rdbms.server_security_alert_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_server
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long |
name | string | The name of the resource. |
disabledAlerts | array | Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. |
emailAccountAdmins | boolean | Specifies that the alert is sent to the account administrators. |
emailAddresses | array | Specifies an array of e-mail addresses to which the alert is sent. |
retentionDays | integer | Specifies the number of days to keep in the Threat Detection audit logs. |
state | string | Specifies the state of the policy, whether it is enabled or disabled. Known values are: "Enabled" and "Disabled". |
storageAccountAccessKey | string | Specifies the identifier key of the Threat Detection audit storage account. |
storageEndpoint | string | Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long |
name | string | The name of the resource. |
disabledAlerts | array | Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. |
emailAccountAdmins | boolean | Specifies that the alert is sent to the account administrators. |
emailAddresses | array | Specifies an array of e-mail addresses to which the alert is sent. |
retentionDays | integer | Specifies the number of days to keep in the Threat Detection audit logs. |
state | string | Specifies the state of the policy, whether it is enabled or disabled. Known values are: "Enabled" and "Disabled". |
storageAccountAccessKey | string | Specifies the identifier key of the Threat Detection audit storage account. |
storageEndpoint | string | Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, server_name, security_alert_policy_name, subscription_id | Get a server's security alert policy. | |
list_by_server | select | resource_group_name, server_name, subscription_id | Get the server's threat detection policies. | |
create_or_update | insert | resource_group_name, server_name, security_alert_policy_name, subscription_id | Creates or updates a threat detection policy. | |
create_or_update | replace | resource_group_name, server_name, security_alert_policy_name, subscription_id | Creates 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
security_alert_policy_name | string | The name of the threat detection policy. "Default" Required. |
server_name | string | The name of the server. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_server
Get a server's security alert policy.
SELECT
id,
name,
disabledAlerts,
emailAccountAdmins,
emailAddresses,
retentionDays,
state,
storageAccountAccessKey,
storageEndpoint,
type
FROM azure_extras.rdbms.server_security_alert_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND security_alert_policy_name = '{{ security_alert_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get the server's threat detection policies.
SELECT
id,
name,
disabledAlerts,
emailAccountAdmins,
emailAddresses,
retentionDays,
state,
storageAccountAccessKey,
storageEndpoint,
type
FROM azure_extras.rdbms.server_security_alert_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a threat detection policy.
INSERT INTO azure_extras.rdbms.server_security_alert_policies (
properties,
resource_group_name,
server_name,
security_alert_policy_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ security_alert_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
type
;
# Description fields are for documentation purposes
- name: server_security_alert_policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the server_security_alert_policies resource.
- name: server_name
value: "{{ server_name }}"
description: Required parameter for the server_security_alert_policies resource.
- name: security_alert_policy_name
value: "{{ security_alert_policy_name }}"
description: Required parameter for the server_security_alert_policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the server_security_alert_policies resource.
- name: properties
value:
state: "{{ state }}"
disabledAlerts:
- "{{ disabledAlerts }}"
emailAddresses:
- "{{ emailAddresses }}"
emailAccountAdmins: {{ emailAccountAdmins }}
storageEndpoint: "{{ storageEndpoint }}"
storageAccountAccessKey: "{{ storageAccountAccessKey }}"
retentionDays: {{ retentionDays }}
REPLACE examples
- create_or_update
Creates or updates a threat detection policy.
REPLACE azure_extras.rdbms.server_security_alert_policies
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND security_alert_policy_name = '{{ security_alert_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
type;