Database Threat Detection Policies - Get
Gets a database's threat detection policy.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/default?api-version=2014-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database for which database Threat Detection policy is defined. |
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
security
|
path | True |
The name of the security alert policy. |
|
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved the database Threat Detection policy. |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Get database security alert policy
Sample request
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb",
"name": "default",
"type": "Microsoft.Sql/servers/databases/securityAlertPolicies",
"location": "Japan East",
"kind": "V12",
"properties": {
"state": "Enabled",
"emailAccountAdmins": "Enabled",
"emailAddresses": "test@microsoft.com;user@microsoft.com",
"disabledAlerts": "Usage_Anomaly",
"retentionDays": 0,
"storageAccountAccessKey": "",
"storageEndpoint": "",
"useServerDefault": "Enabled"
}
}
Definitions
Name | Description |
---|---|
Database |
Contains information about a database Threat Detection policy. |
Security |
Specifies that the alert is sent to the account administrators. |
Security |
The name of the security alert policy. |
Security |
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. |
Security |
Specifies whether to use the default server policy. |
DatabaseSecurityAlertPolicy
Contains information about a database Threat Detection policy.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
kind |
string |
Resource kind. |
location |
string |
The geo-location where the resource lives |
name |
string |
Resource name. |
properties.disabledAlerts |
string |
Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action. |
properties.emailAccountAdmins |
Specifies that the alert is sent to the account administrators. |
|
properties.emailAddresses |
string |
Specifies the semicolon-separated list of e-mail addresses to which the alert is sent. |
properties.retentionDays |
integer |
Specifies the number of days to keep in the Threat Detection audit logs. |
properties.state |
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. |
|
properties.storageAccountAccessKey |
string |
Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required. |
properties.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. If state is Enabled, storageEndpoint is required. |
properties.useServerDefault |
Specifies whether to use the default server policy. |
|
type |
string |
Resource type. |
SecurityAlertPolicyEmailAccountAdmins
Specifies that the alert is sent to the account administrators.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
SecurityAlertPolicyName
The name of the security alert policy.
Name | Type | Description |
---|---|---|
default |
string |
SecurityAlertPolicyState
Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
|
New |
string |
SecurityAlertPolicyUseServerDefault
Specifies whether to use the default server policy.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |