managed_database_sensitivity_labels
Creates, updates, deletes, gets or lists a managed_database_sensitivity_labels
resource.
Overview
Name | managed_database_sensitivity_labels |
Type | Resource |
Id | azure.sql.managed_database_sensitivity_labels |
Fields
- vw_managed_database_sensitivity_labels
- managed_database_sensitivity_labels
Name | Datatype | Description |
---|---|---|
columnName | text | field from the properties object |
column_name | text | field from the properties object |
databaseName | text | field from the properties object |
information_type | text | field from the properties object |
information_type_id | text | field from the properties object |
is_disabled | text | field from the properties object |
label_id | text | field from the properties object |
label_name | text | field from the properties object |
managedInstanceName | text | field from the properties object |
managed_by | text | field from the properties object |
rank | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schemaName | text | field from the properties object |
schema_name | text | field from the properties object |
sensitivityLabelSource | text | field from the properties object |
subscriptionId | text | field from the properties object |
tableName | text | field from the properties object |
table_name | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
managedBy | string | Resource that manages the sensitivity label. |
properties | object | Properties of a sensitivity label. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | columnName, databaseName, managedInstanceName, resourceGroupName, schemaName, sensitivityLabelSource, subscriptionId, tableName | Gets the sensitivity label of a given column |
create_or_update | INSERT | columnName, databaseName, managedInstanceName, resourceGroupName, schemaName, sensitivityLabelSource, subscriptionId, tableName | Creates or updates the sensitivity label of a given column |
delete | DELETE | columnName, databaseName, managedInstanceName, resourceGroupName, schemaName, sensitivityLabelSource, subscriptionId, tableName | Deletes the sensitivity label of a given column |
update | UPDATE | databaseName, managedInstanceName, resourceGroupName, subscriptionId | Update sensitivity labels of a given database using an operations batch. |
disable_recommendation | EXEC | columnName, databaseName, managedInstanceName, resourceGroupName, schemaName, sensitivityLabelSource, subscriptionId, tableName | Disables sensitivity recommendations on a given column |
enable_recommendation | EXEC | columnName, databaseName, managedInstanceName, resourceGroupName, schemaName, sensitivityLabelSource, subscriptionId, tableName | Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns) |
SELECT
examples
Gets the sensitivity label of a given column
- vw_managed_database_sensitivity_labels
- managed_database_sensitivity_labels
SELECT
columnName,
column_name,
databaseName,
information_type,
information_type_id,
is_disabled,
label_id,
label_name,
managedInstanceName,
managed_by,
rank,
resourceGroupName,
schemaName,
schema_name,
sensitivityLabelSource,
subscriptionId,
tableName,
table_name
FROM azure.sql.vw_managed_database_sensitivity_labels
WHERE columnName = '{{ columnName }}'
AND databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND sensitivityLabelSource = '{{ sensitivityLabelSource }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';
SELECT
managedBy,
properties
FROM azure.sql.managed_database_sensitivity_labels
WHERE columnName = '{{ columnName }}'
AND databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND sensitivityLabelSource = '{{ sensitivityLabelSource }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new managed_database_sensitivity_labels
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_database_sensitivity_labels (
columnName,
databaseName,
managedInstanceName,
resourceGroupName,
schemaName,
sensitivityLabelSource,
subscriptionId,
tableName,
properties
)
SELECT
'{{ columnName }}',
'{{ databaseName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ schemaName }}',
'{{ sensitivityLabelSource }}',
'{{ subscriptionId }}',
'{{ tableName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: managedBy
value: string
- name: properties
value:
- name: schemaName
value: string
- name: tableName
value: string
- name: columnName
value: string
- name: labelName
value: string
- name: labelId
value: string
- name: informationType
value: string
- name: informationTypeId
value: string
- name: isDisabled
value: boolean
- name: rank
value: string
UPDATE
example
Updates a managed_database_sensitivity_labels
resource.
/*+ update */
UPDATE azure.sql.managed_database_sensitivity_labels
SET
operations = '{{ operations }}'
WHERE
databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified managed_database_sensitivity_labels
resource.
/*+ delete */
DELETE FROM azure.sql.managed_database_sensitivity_labels
WHERE columnName = '{{ columnName }}'
AND databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND sensitivityLabelSource = '{{ sensitivityLabelSource }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';