Skip to main content

sensitivity_labels

Creates, updates, deletes, gets or lists a sensitivity_labels resource.

Overview

Namesensitivity_labels
TypeResource
Idazure.sql.sensitivity_labels

Fields

NameDatatypeDescription
columnNametextfield from the properties object
column_nametextfield from the properties object
databaseNametextfield from the properties object
information_typetextfield from the properties object
information_type_idtextfield from the properties object
is_disabledtextfield from the properties object
label_idtextfield from the properties object
label_nametextfield from the properties object
managed_bytextfield from the properties object
ranktextfield from the properties object
resourceGroupNametextfield from the properties object
schemaNametextfield from the properties object
schema_nametextfield from the properties object
sensitivityLabelSourcetextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object
tableNametextfield from the properties object
table_nametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcolumnName, databaseName, resourceGroupName, schemaName, sensitivityLabelSource, serverName, subscriptionId, tableNameGets the sensitivity label of a given column
create_or_updateINSERTcolumnName, databaseName, resourceGroupName, schemaName, sensitivityLabelSource, serverName, subscriptionId, tableNameCreates or updates the sensitivity label of a given column
deleteDELETEcolumnName, databaseName, resourceGroupName, schemaName, sensitivityLabelSource, serverName, subscriptionId, tableNameDeletes the sensitivity label of a given column
updateUPDATEdatabaseName, resourceGroupName, serverName, subscriptionIdUpdate sensitivity labels of a given database using an operations batch.
disable_recommendationEXECcolumnName, databaseName, resourceGroupName, schemaName, sensitivityLabelSource, serverName, subscriptionId, tableNameDisables sensitivity recommendations on a given column
enable_recommendationEXECcolumnName, databaseName, resourceGroupName, schemaName, sensitivityLabelSource, serverName, subscriptionId, tableNameEnables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)

SELECT examples

Gets the sensitivity label of a given column

SELECT
columnName,
column_name,
databaseName,
information_type,
information_type_id,
is_disabled,
label_id,
label_name,
managed_by,
rank,
resourceGroupName,
schemaName,
schema_name,
sensitivityLabelSource,
serverName,
subscriptionId,
tableName,
table_name
FROM azure.sql.vw_sensitivity_labels
WHERE columnName = '{{ columnName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND sensitivityLabelSource = '{{ sensitivityLabelSource }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';

INSERT example

Use the following StackQL query and manifest file to create a new sensitivity_labels resource.

/*+ create */
INSERT INTO azure.sql.sensitivity_labels (
columnName,
databaseName,
resourceGroupName,
schemaName,
sensitivityLabelSource,
serverName,
subscriptionId,
tableName,
properties
)
SELECT
'{{ columnName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ schemaName }}',
'{{ sensitivityLabelSource }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ tableName }}',
'{{ properties }}'
;

UPDATE example

Updates a sensitivity_labels resource.

/*+ update */
UPDATE azure.sql.sensitivity_labels
SET
operations = '{{ operations }}'
WHERE
databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified sensitivity_labels resource.

/*+ delete */
DELETE FROM azure.sql.sensitivity_labels
WHERE columnName = '{{ columnName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND sensitivityLabelSource = '{{ sensitivityLabelSource }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';