Managed Server Security Alert Policies - List By Instance
获取托管服务器的威胁检测策略。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies?api-version=2023-08-01
		URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 | 
|---|---|---|---|---|
| 
						 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 the managed server's threat detection policies
示例请求
示例响应
{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440",
      "name": "Default",
      "type": "Microsoft.Sql/managedInstances/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": "Disabled",
        "emailAccountAdmins": true,
        "emailAddresses": [
          "test@consoto.com;user@consoto.com"
        ],
        "disabledAlerts": [
          "Access_Anomaly"
        ],
        "retentionDays": 0,
        "storageAccountAccessKey": "",
        "storageEndpoint": "",
        "creationTime": "2020-04-03T04:41:33.937Z"
      }
    }
  ]
}
				定义
| 名称 | 说明 | 
|---|---|
| 
							created | 
						
							 创建资源的标识的类型。  | 
					
| 
							Error | 
						
							 资源管理错误附加信息。  | 
					
| 
							Error | 
						
							 错误详细信息。  | 
					
| 
							Error | 
						
							 错误响应  | 
					
| 
							Managed | 
						
							 托管服务器安全警报策略。  | 
					
| 
							Managed | 
						
							 托管服务器的安全警报策略列表。  | 
					
| 
							Security | 
						
							 指定策略的状态,无论是启用或禁用还是尚未对特定数据库应用策略。  | 
					
| 
							system | 
						
							 与创建和上次修改资源相关的元数据。  | 
					
createdByType 
			
			创建资源的标识的类型。
| 值 | 说明 | 
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key | 
ErrorAdditionalInfo  
			
			资源管理错误附加信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| info | 
			 object  | 
	
		 其他信息。  | 
| type | 
			 string  | 
	
		 其他信息类型。  | 
ErrorDetail 
			
			错误详细信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| additionalInfo | 
		 错误附加信息。  | 
|
| code | 
			 string  | 
	
		 错误代码。  | 
| details | 
		 错误详细信息。  | 
|
| message | 
			 string  | 
	
		 错误消息。  | 
| target | 
			 string  | 
	
		 错误目标。  | 
ErrorResponse 
			
			错误响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| error | 
		 错误对象。  | 
ManagedServerSecurityAlertPolicy    
			
			托管服务器安全警报策略。
| 名称 | 类型 | 说明 | 
|---|---|---|
| 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 存储终结点(例如   | 
| systemData | 
		 SecurityAlertPolicyResource 的 SystemData。  | 
|
| type | 
			 string  | 
	
		 资源类型。  | 
ManagedServerSecurityAlertPolicyListResult      
			
			托管服务器的安全警报策略列表。
| 名称 | 类型 | 说明 | 
|---|---|---|
| nextLink | 
			 string  | 
	
		 用于检索下一页结果的链接。  | 
| value | 
		 结果数组。  | 
SecurityAlertsPolicyState   
			
			指定策略的状态,无论是启用或禁用还是尚未对特定数据库应用策略。
| 值 | 说明 | 
|---|---|
| Enabled | |
| Disabled | 
systemData 
			
			与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 | 
|---|---|---|
| createdAt | 
			 string (date-time)  | 
	
		 资源创建时间戳(UTC)。  | 
| createdBy | 
			 string  | 
	
		 创建资源的标识。  | 
| createdByType | 
		 创建资源的标识的类型。  | 
|
| lastModifiedAt | 
			 string (date-time)  | 
	
		 上次修改的资源时间戳(UTC)  | 
| lastModifiedBy | 
			 string  | 
	
		 上次修改资源的标识。  | 
| lastModifiedByType | 
		 上次修改资源的标识的类型。  |