ManagedDatabaseSensitivityLabelsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:managed_database_sensitivity_labels> attribute.
Constructor
ManagedDatabaseSensitivityLabelsOperations(*args, **kwargs)
Methods
| create_or_update |
Creates or updates the sensitivity label of a given column. |
| delete |
Deletes the sensitivity label of a given column. |
| disable_recommendation |
Disables sensitivity recommendations on a given column. |
| enable_recommendation |
Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). |
| get |
Gets the sensitivity label of a given column. |
| list_current_by_database |
Gets the sensitivity labels of a given database. |
| list_recommended_by_database |
Gets the sensitivity labels of a given database. |
| update |
Update sensitivity labels of a given database using an operations batch. |
create_or_update
Creates or updates the sensitivity label of a given column.
async create_or_update(resource_group_name: str, managed_instance_name: str, database_name: str, schema_name: str, table_name: str, column_name: str, parameters: _models.SensitivityLabel, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SensitivityLabel
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
schema_name
Required
|
The name of the schema. Required. |
|
table_name
Required
|
The name of the table. Required. |
|
column_name
Required
|
The name of the column. Required. |
|
parameters
Required
|
The column sensitivity label resource. Is either a SensitivityLabel type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
SensitivityLabel or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
delete
Deletes the sensitivity label of a given column.
async delete(resource_group_name: str, managed_instance_name: str, database_name: str, schema_name: str, table_name: str, column_name: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
schema_name
Required
|
The name of the schema. Required. |
|
table_name
Required
|
The name of the table. Required. |
|
column_name
Required
|
The name of the column. Required. |
Returns
| Type | Description |
|---|---|
|
None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
disable_recommendation
Disables sensitivity recommendations on a given column.
async disable_recommendation(resource_group_name: str, managed_instance_name: str, database_name: str, schema_name: str, table_name: str, column_name: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
schema_name
Required
|
The name of the schema. Required. |
|
table_name
Required
|
The name of the table. Required. |
|
column_name
Required
|
The name of the column. Required. |
Returns
| Type | Description |
|---|---|
|
None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
enable_recommendation
Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns).
async enable_recommendation(resource_group_name: str, managed_instance_name: str, database_name: str, schema_name: str, table_name: str, column_name: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
schema_name
Required
|
The name of the schema. Required. |
|
table_name
Required
|
The name of the table. Required. |
|
column_name
Required
|
The name of the column. Required. |
Returns
| Type | Description |
|---|---|
|
None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets the sensitivity label of a given column.
async get(resource_group_name: str, managed_instance_name: str, database_name: str, schema_name: str, table_name: str, column_name: str, sensitivity_label_source: str | SensitivityLabelSource, **kwargs: Any) -> SensitivityLabel
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
schema_name
Required
|
The name of the schema. Required. |
|
table_name
Required
|
The name of the table. Required. |
|
column_name
Required
|
The name of the column. Required. |
|
sensitivity_label_source
Required
|
The source of the sensitivity label. Known values are: "current" and "recommended". Required. |
Returns
| Type | Description |
|---|---|
|
SensitivityLabel or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_current_by_database
Gets the sensitivity labels of a given database.
list_current_by_database(resource_group_name: str, managed_instance_name: str, database_name: str, skip_token: str | None = None, count: bool | None = None, filter: str | None = None, **kwargs: Any) -> AsyncItemPaged[SensitivityLabel]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
skip_token
|
Default value is None. Default value: None
|
|
count
|
Default value is None. Default value: None
|
|
filter
|
An OData filter expression that filters elements in the collection. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either SensitivityLabel or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_recommended_by_database
Gets the sensitivity labels of a given database.
list_recommended_by_database(resource_group_name: str, managed_instance_name: str, database_name: str, skip_token: str | None = None, include_disabled_recommendations: bool | None = None, filter: str | None = None, **kwargs: Any) -> AsyncItemPaged[SensitivityLabel]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
skip_token
|
Default value is None. Default value: None
|
|
include_disabled_recommendations
|
Specifies whether to include disabled recommendations or not. Default value is None. Default value: None
|
|
filter
|
An OData filter expression that filters elements in the collection. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either SensitivityLabel or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
update
Update sensitivity labels of a given database using an operations batch.
async update(resource_group_name: str, managed_instance_name: str, database_name: str, parameters: _models.SensitivityLabelUpdateList, *, content_type: str = 'application/json', **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
|
managed_instance_name
Required
|
The name of the managed instance. Required. |
|
database_name
Required
|
The name of the database. Required. |
|
parameters
Required
|
Is either a SensitivityLabelUpdateList type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
Attributes
models
models = <module 'azure.mgmt.sql.models' from 'C:\\ToolCache\\Python\\3.12.10\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv268\\Lib\\site-packages\\azure\\mgmt\\sql\\models\\__init__.py'>