Sql Pool Sensitivity Labels - Create Or Update

Creates or updates the sensitivity label of a given column in a Sql pool

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/current?api-version=2021-06-01

URI Parameters

Name In Required Type Description
columnName
path True

string

The name of the column.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

schemaName
path True

string

The name of the schema.

sensitivityLabelSource
path True

WritableSensitivityLabelSource

The source of the sensitivity label.

sqlPoolName
path True

string

SQL pool name

subscriptionId
path True

string

The ID of the target subscription.

tableName
path True

string

The name of the table.

workspaceName
path True

string

The name of the workspace.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
properties.informationType

string

The information type.

properties.informationTypeId

string

The information type ID.

properties.labelId

string

The label ID.

properties.labelName

string

The label name.

properties.rank

SensitivityLabelRank

Responses

Name Type Description
200 OK

SensitivityLabel

Successfully updated the sensitivity label.

201 Created

SensitivityLabel

Successfully created the sensitivity label.

Other Status Codes

*** Error Responses: ***

  • 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.

  • 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid

  • 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid

  • 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified

  • 400 LabelNameTooLong - Label name cannot exceed {0} characters

  • 400 InformationTypeTooLong - Information type cannot exceed {0} characters

  • 400 LabelIdMustBeGuid - Label ID must be a GUID

  • 400 InformationTypeIdMustBeGuid - Information type ID must be a GUID

  • 400 LabelMissing - Label is missing

  • 400 InformationTypeMissing - Information Type is missing

  • 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

  • 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found

  • 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet

Examples

Updates the sensitivity label of a given column with all parameters

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current?api-version=2021-06-01

{
  "properties": {
    "informationType": "PhoneNumber",
    "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
    "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
    "labelName": "PII"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
  "name": "current",
  "type": "Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels",
  "properties": {
    "informationType": "PhoneNumber",
    "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
    "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
    "labelName": "PII"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/myServer/sqlPools/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
  "name": "current",
  "type": "Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns/sensitivityLabels",
  "properties": {
    "informationType": "PhoneNumber",
    "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
    "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
    "labelName": "PII"
  }
}

Definitions

Name Description
SensitivityLabel

A sensitivity label.

SensitivityLabelRank
WritableSensitivityLabelSource

The source of the sensitivity label.

SensitivityLabel

A sensitivity label.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

managedBy

string

managed by

name

string

The name of the resource

properties.columnName

string

The column name.

properties.informationType

string

The information type.

properties.informationTypeId

string

The information type ID.

properties.isDisabled

boolean

Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.

properties.labelId

string

The label ID.

properties.labelName

string

The label name.

properties.rank

SensitivityLabelRank

properties.schemaName

string

The schema name.

properties.tableName

string

The table name.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

SensitivityLabelRank

Name Type Description
Critical

string

High

string

Low

string

Medium

string

None

string

WritableSensitivityLabelSource

The source of the sensitivity label.

Name Type Description
current

string