Database Advanced Threat Protection Settings - Create Or Update
创建或更新数据库的高级威胁防护状态。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/Default?api-version=2023-08-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
advanced
|
path | True |
高级威胁防护状态的名称。 |
|
|
database
|
path | True |
string |
数据库的名称。 |
|
resource
|
path | True |
string |
包含资源的资源组的名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
|
server
|
path | True |
string |
服务器的名称。 |
|
subscription
|
path | True |
string |
标识 Azure 订阅的订阅 ID。 |
|
api-version
|
query | True |
string |
要用于请求的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| properties.state | True |
指定高级威胁防护的状态,无论是启用或禁用还是尚未在特定数据库或服务器上应用状态。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功设置数据库高级威胁防护状态。 |
|
| 201 Created |
已成功创建数据库高级威胁防护状态。 |
|
| Other Status Codes |
错误响应: ***
|
示例
| Update a database's Advanced Threat Protection settings with all parameters |
| Update a database's Advanced Threat Protection settings with minimal parameters |
Update a database's Advanced Threat Protection settings with all parameters
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/databases/testdb/advancedThreatProtectionSettings/Default?api-version=2023-08-01
{
"properties": {
"state": "Enabled"
}
}
示例响应
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default",
"name": "Default",
"type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2022-04-03T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-04-03T04:41:33.937Z"
},
"properties": {
"state": "Enabled",
"creationTime": "2022-04-03T04:41:33.937Z"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default",
"name": "Default",
"type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2022-04-03T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-04-03T04:41:33.937Z"
},
"properties": {
"state": "Enabled",
"creationTime": "2022-04-03T04:41:33.937Z"
}
}
Update a database's Advanced Threat Protection settings with minimal parameters
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/databases/testdb/advancedThreatProtectionSettings/Default?api-version=2023-08-01
{
"properties": {
"state": "Disabled"
}
}
示例响应
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default",
"name": "Default",
"type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2022-04-03T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-04-03T04:41:33.937Z"
},
"properties": {
"state": "Disabled",
"creationTime": "2022-04-03T04:41:33.937Z"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default",
"name": "Default",
"type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2022-04-03T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-04-03T04:41:33.937Z"
},
"properties": {
"state": "Disabled",
"creationTime": "2022-04-03T04:41:33.937Z"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Advanced |
高级威胁防护状态的名称。 |
|
Advanced |
指定高级威胁防护的状态,无论是启用或禁用还是尚未在特定数据库或服务器上应用状态。 |
|
created |
创建资源的标识的类型。 |
|
Database |
数据库高级威胁防护。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
system |
与创建和上次修改资源相关的元数据。 |
AdvancedThreatProtectionName
高级威胁防护状态的名称。
| 值 | 说明 |
|---|---|
| Default |
AdvancedThreatProtectionState
指定高级威胁防护的状态,无论是启用或禁用还是尚未在特定数据库或服务器上应用状态。
| 值 | 说明 |
|---|---|
| New | |
| Enabled | |
| Disabled |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DatabaseAdvancedThreatProtection
数据库高级威胁防护。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| name |
string |
资源名称。 |
| properties.creationTime |
string (date-time) |
指定策略的 UTC 创建时间。 |
| properties.state |
指定高级威胁防护的状态,无论是启用或禁用还是尚未在特定数据库或服务器上应用状态。 |
|
| systemData |
AdvancedThreatProtectionResource 的 SystemData。 |
|
| type |
string |
资源类型。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |