Sensitivity Labels - Create Or Update
Creates or updates the sensitivity label of a given column
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/current?api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
column
|
path | True |
string |
The name of the column. |
database
|
path | True |
string |
The name of the database. |
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
schema
|
path | True |
string |
The name of the schema. |
sensitivity
|
path | True |
The source of the sensitivity label. |
|
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
table
|
path | True |
string |
The name of the table. |
api-version
|
query | True |
string |
The API version to use for the request. |
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 |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully updated the sensitivity label. |
|
201 Created |
Successfully created the sensitivity label. |
|
Other Status Codes |
*** Error Responses: ***
|
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.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current?api-version=2021-11-01
{
"properties": {
"informationType": "PhoneNumber",
"informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
"labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
"labelName": "PII",
"rank": "Low"
}
}
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"schemaName": "dbo",
"tableName": "myTable",
"columnName": "myColumn",
"informationType": "PhoneNumber",
"informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
"labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
"labelName": "PII",
"rank": "Medium"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"informationType": "PhoneNumber",
"informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
"labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
"labelName": "PII",
"rank": "High"
}
}
Definitions
Name | Description |
---|---|
Sensitivity |
A sensitivity label. |
Sensitivity |
|
Writable |
The source of the sensitivity label. |
SensitivityLabel
A sensitivity label.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
managedBy |
string |
Resource that manages the sensitivity label. |
name |
string |
Resource name. |
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 | ||
properties.schemaName |
string |
The schema name. |
properties.tableName |
string |
The table name. |
type |
string |
Resource type. |
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 |