Database Security Alert Policies - Get
Gets a database's security alert policy.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/default?api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database for which the security alert 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 security alert policy. |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Get a database's threat detection 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",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-03T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-03T04:41:33.937Z"
},
"properties": {
"state": "Enabled",
"emailAccountAdmins": true,
"emailAddresses": [
"test@consoto.com",
"user@consoto.com"
],
"disabledAlerts": [
"Usage_Anomaly"
],
"retentionDays": 0,
"creationTime": "2020-04-03T04:41:33.937Z"
}
}
Definitions
Name | Description |
---|---|
created |
The type of identity that created the resource. |
Database |
A database security alert policy. |
Security |
The name of the security alert policy. |
Security |
Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. |
system |
Metadata pertaining to creation and last modification of the resource. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DatabaseSecurityAlertPolicy
A database security alert policy.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.creationTime |
string |
Specifies the UTC creation time of the policy. |
properties.disabledAlerts |
string[] |
Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force |
properties.emailAccountAdmins |
boolean |
Specifies that the alert is sent to the account administrators. |
properties.emailAddresses |
string[] |
Specifies an array 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, whether it is enabled or disabled or a policy has not been applied yet on the specific database. |
|
properties.storageAccountAccessKey |
string |
Specifies the identifier key of the Threat Detection audit storage account. |
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. |
systemData |
SystemData of SecurityAlertPolicyResource. |
|
type |
string |
Resource type. |
SecurityAlertPolicyName
The name of the security alert policy.
Name | Type | Description |
---|---|---|
default |
string |
SecurityAlertsPolicyState
Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |