Sensitivity Labels - List Current By Database

Gets the sensitivity labels of a given database

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels?api-version=2017-03-01-preview
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels?$filter={$filter}&api-version=2017-03-01-preview

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The subscription ID that identifies an Azure subscription.

resourceGroupName
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.

serverName
path True
  • string

The name of the server.

databaseName
path True
  • string

The name of the database.

$filter
query
  • string

An OData filter expression that filters elements in the collection.

api-version
query True
  • string

The API version to use for the request.

Responses

Name Type Description
200 OK

Successfully retrieved the sensitivity labels.

Other Status Codes

*** Error Responses: ***

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

  • 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

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

Examples

Gets the current sensitivity labels of a given database

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/currentSensitivityLabels?api-version=2017-03-01-preview

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current",
      "name": "current",
      "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
      "properties": {
        "informationType": "Financial",
        "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
        "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a",
        "labelName": "Sensitive"
      }
    },
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/current",
      "name": "current",
      "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
      "properties": {
        "informationType": "Email",
        "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
        "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff",
        "labelName": "PII"
      }
    }
  ]
}

Definitions

SensitivityLabel

A sensitivity label.

SensitivityLabelListResult

A list of sensitivity labels.

SensitivityLabel

A sensitivity label.

Name Type Description
id
  • string

Resource ID.

name
  • string

Resource 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.

type
  • string

Resource type.

SensitivityLabelListResult

A list of sensitivity labels.

Name Type Description
nextLink
  • string

Link to retrieve next page of results.

value

Array of results.