Managed Database Security Alert Policies - List By Database
获取托管数据库的安全警报策略的列表。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies?api-version=2023-08-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
database
|
path | True |
string |
为其定义了安全警报策略的托管数据库的名称。 |
|
managed
|
path | True |
string |
托管实例的名称。 |
|
resource
|
path | True |
string |
包含资源的资源组的名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
|
subscription
|
path | True |
string |
标识 Azure 订阅的订阅 ID。 |
|
api-version
|
query | True |
string |
要用于请求的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
已成功检索托管数据库安全警报策略。 |
|
| Other Status Codes |
错误响应: ***
|
示例
Get a list of the database's threat detection policies.
示例请求
示例响应
{
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb",
"name": "default",
"type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies",
"properties": {
"state": "Enabled",
"emailAccountAdmins": true,
"emailAddresses": [
"test@contoso.com",
"user@contoso.com"
],
"disabledAlerts": [
"Usage_Anomaly"
],
"retentionDays": 0,
"storageAccountAccessKey": "",
"storageEndpoint": ""
}
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Managed |
托管数据库安全警报策略。 |
|
Managed |
托管数据库的安全警报策略列表。 |
|
Security |
指定策略的状态,无论是启用或禁用还是尚未对特定数据库应用策略。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ManagedDatabaseSecurityAlertPolicy
托管数据库安全警报策略。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| name |
string |
资源名称。 |
| properties.creationTime |
string (date-time) |
指定策略的 UTC 创建时间。 |
| properties.disabledAlerts |
string[] |
指定禁用的警报数组。 允许的值为:Sql_Injection、Sql_Injection_Vulnerability、Access_Anomaly、Data_Exfiltration、Unsafe_Action、Brute_Force |
| properties.emailAccountAdmins |
boolean |
指定警报将发送到帐户管理员。 |
| properties.emailAddresses |
string[] |
指定警报发送到的电子邮件地址数组。 |
| properties.retentionDays |
integer (int32) |
指定要保留在威胁检测审核日志中的天数。 |
| properties.state |
指定策略的状态,无论是启用或禁用还是尚未对特定数据库应用策略。 |
|
| properties.storageAccountAccessKey |
string |
指定威胁检测审核存储帐户的标识符密钥。 |
| properties.storageEndpoint |
string |
指定 blob 存储终结点(例如 |
| type |
string |
资源类型。 |
ManagedDatabaseSecurityAlertPolicyListResult
托管数据库的安全警报策略列表。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
用于检索下一页结果的链接。 |
| value |
结果数组。 |
SecurityAlertPolicyState
指定策略的状态,无论是启用或禁用还是尚未对特定数据库应用策略。
| 值 | 说明 |
|---|---|
| New | |
| Enabled | |
| Disabled |