你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Workspace Managed Sql Server Security Alert Policy - Create Or Update
创建或更新服务器的威胁检测策略。
创建或更新工作区托管 sql server 的威胁检测策略。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies/Default?api-version=2021-06-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
resource
|
path | True |
string |
资源组的名称。 此名称不区分大小写。 |
security
|
path | True |
安全警报策略的名称。 |
|
subscription
|
path | True |
string |
目标订阅的 ID。 |
workspace
|
path | True |
string |
工作区的名称。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
properties.state | True |
指定策略的状态,无论是启用或禁用策略,还是尚未在特定服务器上应用策略 |
|
properties.disabledAlerts |
string[] |
指定禁用的警报数组。 允许的值为:Sql_Injection、Sql_Injection_Vulnerability、Access_Anomaly、Data_Exfiltration、Unsafe_Action |
|
properties.emailAccountAdmins |
boolean |
指定将警报发送到帐户管理员。 |
|
properties.emailAddresses |
string[] |
指定警报发送到的电子邮件地址数组。 |
|
properties.retentionDays |
integer |
指定要在威胁检测审核日志中保留的天数。 |
|
properties.storageAccountAccessKey |
string |
指定威胁检测审核存储帐户的标识符密钥。 |
|
properties.storageEndpoint |
string |
指定 blob 存储终结点 (例如 https://MyAccount.blob.core.windows.net) 。 此 Blob 存储将保存所有威胁检测审核日志。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
已成功更新威胁检测策略。 |
|
202 Accepted |
已接受。 |
|
Other Status Codes |
错误响应: ***
|
示例
Update a workspace managed sql server's threat detection policy with all parameters |
Update a workspace managed sql server's threat detection policy with minimal parameters |
Update a workspace managed sql server's threat detection policy with all parameters
Sample Request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default?api-version=2021-06-01
{
"properties": {
"state": "Enabled",
"emailAccountAdmins": true,
"emailAddresses": [
"testSecurityAlert@microsoft.com"
],
"disabledAlerts": [
"Access_Anomaly",
"Usage_Anomaly"
],
"retentionDays": 5,
"storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
Sample Response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default",
"name": "Default",
"type": "Microsoft.Synapse/workspaces/securityAlertPolicies",
"properties": {
"state": "Enabled",
"emailAccountAdmins": true,
"emailAddresses": [
"testSecurityAlert@microsoft.com"
],
"disabledAlerts": [
"Access_Anomaly",
"Usage_Anomaly"
],
"creationTime": "2020-10-23T04:52:49.52Z",
"retentionDays": 5,
"storageAccountAccessKey": "",
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
Update a workspace managed sql server's threat detection policy with minimal parameters
Sample Request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default?api-version=2021-06-01
{
"properties": {
"state": "Disabled",
"emailAccountAdmins": true,
"storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
Sample Response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/securityAlertPolicies/Default",
"name": "Default",
"type": "Microsoft.Synapse/workspaces/securityAlertPolicies",
"properties": {
"state": "Enabled",
"emailAccountAdmins": true,
"emailAddresses": [
""
],
"disabledAlerts": [
""
],
"creationTime": "2020-10-23T04:52:49.52Z",
"retentionDays": 0,
"storageAccountAccessKey": "",
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
定义
名称 | 说明 |
---|---|
Security |
安全警报策略的名称。 |
Security |
指定策略的状态,无论是启用或禁用策略,还是尚未在特定服务器上应用策略 |
Server |
工作区托管的 Sql Server 安全警报策略。 |
SecurityAlertPolicyName
安全警报策略的名称。
名称 | 类型 | 说明 |
---|---|---|
Default |
string |
SecurityAlertPolicyState
指定策略的状态,无论是启用或禁用策略,还是尚未在特定服务器上应用策略
名称 | 类型 | 说明 |
---|---|---|
Disabled |
string |
|
Enabled |
string |
|
New |
string |
ServerSecurityAlertPolicy
工作区托管的 Sql Server 安全警报策略。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
资源的名称 |
properties.creationTime |
string |
指定策略的 UTC 创建时间。 |
properties.disabledAlerts |
string[] |
指定禁用的警报数组。 允许的值为:Sql_Injection、Sql_Injection_Vulnerability、Access_Anomaly、Data_Exfiltration、Unsafe_Action |
properties.emailAccountAdmins |
boolean |
指定将警报发送到帐户管理员。 |
properties.emailAddresses |
string[] |
指定警报发送到的电子邮件地址数组。 |
properties.retentionDays |
integer |
指定要在威胁检测审核日志中保留的天数。 |
properties.state |
指定策略的状态,无论是启用或禁用策略,还是尚未在特定服务器上应用策略 |
|
properties.storageAccountAccessKey |
string |
指定威胁检测审核存储帐户的标识符密钥。 |
properties.storageEndpoint |
string |
指定 blob 存储终结点 (例如 https://MyAccount.blob.core.windows.net) 。 此 Blob 存储将保存所有威胁检测审核日志。 |
type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |