Managed Database Sensitivity Labels - Update
Update sensitivity labels of a given database using an operations batch.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels?api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database. |
managed
|
path | True |
string |
The name of the managed instance. |
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. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Request Body
Name | Type | Description |
---|---|---|
operations |
A sensitivity label update operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully updated sensitivity labels. |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Update sensitivity labels of a given database using an operations batch.
Sample request
PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/currentSensitivityLabels?api-version=2021-11-01
{
"operations": [
{
"properties": {
"op": "set",
"schema": "dbo",
"table": "table1",
"column": "column1",
"sensitivityLabel": {
"properties": {
"labelName": "Highly Confidential",
"labelId": "3A477B16-9423-432B-AA97-6069B481CEC3",
"informationType": "Financial",
"informationTypeId": "1D3652D6-422C-4115-82F1-65DAEBC665C8"
}
}
}
},
{
"properties": {
"op": "set",
"schema": "dbo",
"table": "table2",
"column": "column2",
"sensitivityLabel": {
"properties": {
"informationType": "PhoneNumber",
"informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
"labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
"labelName": "PII"
}
}
}
},
{
"properties": {
"op": "remove",
"schema": "dbo",
"table": "Table1",
"column": "Column3"
}
}
]
}
Sample response
Definitions
Name | Description |
---|---|
Sensitivity |
A sensitivity label. |
Sensitivity |
|
Sensitivity |
A sensitivity label update operation. |
Sensitivity |
|
Sensitivity |
A list of sensitivity label update operations. |
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 |
SensitivityLabelUpdate
A sensitivity label update operation.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.column |
string |
Column name to update. |
properties.op | ||
properties.schema |
string |
Schema name of the column to update. |
properties.sensitivityLabel |
The sensitivity label information to apply on a column. |
|
properties.table |
string |
Table name of the column to update. |
type |
string |
Resource type. |
SensitivityLabelUpdateKind
Name | Type | Description |
---|---|---|
remove |
string |
|
set |
string |
SensitivityLabelUpdateList
A list of sensitivity label update operations.
Name | Type | Description |
---|---|---|
operations |
A sensitivity label update operation. |