你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Recommended Sensitivity Labels - Update

使用操作批处理更新给定数据库的建议敏感度标签状态。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels?api-version=2021-11-01

URI 参数

名称 必需 类型 说明
databaseName
path True

string

数据库的名称。

resourceGroupName
path True

string

包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。

serverName
path True

string

服务器的名称。

subscriptionId
path True

string

用于标识 Azure 订阅的订阅 ID。

api-version
query True

string

要用于请求的 API 版本。

请求正文

名称 类型 说明
operations

RecommendedSensitivityLabelUpdate[]

建议的敏感度标签更新操作。

响应

名称 类型 说明
200 OK

已成功更新建议的敏感度标签。

Other Status Codes

错误响应:***

  • 400 DatawarehouseDatabaseIsDeactivated - 无法执行数据分类操作,因为数据库已暂停。 请恢复它。

  • 400 DatawarehouseDatabaseIsDeactivated - 无法执行数据分类操作,因为数据库已暂停。 请恢复它。

  • 400 SensitivityLabelSourceNameNotSupported - 指定的敏感度标签源无效

  • 400 InvalidRecommendedSensitivityLabelsBatch - 指定的推荐敏感度标签操作无效

  • 400 SensitivityLabelsMissingSchema - Operation[{0}]:缺少架构信息

  • 400 SensitivityLabelsMissingTable - Operation[{0}]:缺少表信息

  • 400 SensitivityLabelsMissingColumn - Operation[{0}]:缺少列信息

  • 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - 无法在单个命令中多次更新列{0}

  • 400 InvalidSensitivityLabelResource - 指定的敏感度标签资源无效

  • 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - 必须至少指定一个 LabelName 和 InformationType

  • 400 LabelNameTooLong - 标签名称不能超过 {0} 字符

  • 400 InformationTypeTooLong - 信息类型不能超过 {0} 字符

  • 400 LabelIdMustBeGuid - 提供的“labelId”无效。 值必须是 GUID

  • 400 InformationTypeIdMustBeGuid - 提供的“informationTypeId”无效。 值必须是 GUID

  • 400 LabelMissing - 需要标签。 必须至少提供“labelName”或“labelId”之一

  • 400 InformationTypeMissing - 需要信息类型。 必须提供至少一个“informationType”或“informationTypeId”

  • 404 SubscriptionDoesNotHaveServer - 找不到请求的服务器

  • 404 DatabaseDoesNotExist - 用户已指定此服务器实例上不存在的数据库名称。

  • 404 SubscriptionDoesNotHaveServer - 找不到请求的服务器

  • 404 DatabaseDoesNotExist - 用户已指定此服务器实例上不存在的数据库名称。

  • 404 SensitivityLabelsLabelNotFound - 找不到指定的敏感度标签

  • 404 SensitivityLabelsSchemaNotFound - 找不到架构{0}

  • 404 SensitivityLabelsTableNotFound - 在架构中找不到该表{0}{1}

  • 404 SensitivityLabelsColumnNotFound - 在表 {2}中找到列{0}。{1}

  • 501 SensitivityLabelRecommendedSourceNameNotSupported - 尚不支持“推荐”敏感度标签源

  • 501 SensitivityLabelRecommendedSourceNameNotSupported - 尚不支持“推荐”敏感度标签源

  • 503 DatabaseUnavailable - 操作失败,因为数据库不可用。

示例

Sample Request

PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/recommendedSensitivityLabels?api-version=2021-11-01

{
  "operations": [
    {
      "properties": {
        "op": "enable",
        "schema": "dbo",
        "table": "table1",
        "column": "column1"
      }
    },
    {
      "properties": {
        "op": "enable",
        "schema": "dbo",
        "table": "table2",
        "column": "column2"
      }
    },
    {
      "properties": {
        "op": "disable",
        "schema": "dbo",
        "table": "table1",
        "column": "column3"
      }
    }
  ]
}

Sample Response

定义

名称 说明
RecommendedSensitivityLabelUpdate

建议的敏感度标签更新操作。

RecommendedSensitivityLabelUpdateKind
RecommendedSensitivityLabelUpdateList

建议的敏感度标签更新操作的列表。

RecommendedSensitivityLabelUpdate

建议的敏感度标签更新操作。

名称 类型 说明
id

string

资源 ID。

name

string

资源名称。

properties.column

string

要更新的列名。

properties.op

RecommendedSensitivityLabelUpdateKind

properties.schema

string

要更新的列的架构名称。

properties.table

string

要更新的列的表名。

type

string

资源类型。

RecommendedSensitivityLabelUpdateKind

名称 类型 说明
disable

string

enable

string

RecommendedSensitivityLabelUpdateList

建议的敏感度标签更新操作的列表。

名称 类型 说明
operations

RecommendedSensitivityLabelUpdate[]

建议的敏感度标签更新操作。