Condividi tramite


WorkloadClassifiersOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SqlManagementClient's

<xref:workload_classifiers> attribute.

Constructor

WorkloadClassifiersOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates a workload classifier.

begin_delete

Deletes a workload classifier.

get

Gets a workload classifier.

list_by_workload_group

Gets the list of workload classifiers for a workload group.

begin_create_or_update

Creates or updates a workload classifier.

async begin_create_or_update(resource_group_name: str, server_name: str, database_name: str, workload_group_name: str, workload_classifier_name: str, parameters: _models.WorkloadClassifier, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.WorkloadClassifier]

Parameters

Name Description
resource_group_name
Required
str

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.

server_name
Required
str

The name of the server. Required.

database_name
Required
str

The name of the database. Required.

workload_group_name
Required
str

The name of the workload group from which to receive the classifier from. Required.

workload_classifier_name
Required
str

The name of the workload classifier to create/update. Required.

parameters
Required

The properties of the workload classifier. Is either a WorkloadClassifier type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either WorkloadClassifier or the result of cls(response)

Exceptions

Type Description

begin_delete

Deletes a workload classifier.

async begin_delete(resource_group_name: str, server_name: str, database_name: str, workload_group_name: str, workload_classifier_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

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.

server_name
Required
str

The name of the server. Required.

database_name
Required
str

The name of the database. Required.

workload_group_name
Required
str

The name of the workload group from which to receive the classifier from. Required.

workload_classifier_name
Required
str

The name of the workload classifier to delete. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

get

Gets a workload classifier.

async get(resource_group_name: str, server_name: str, database_name: str, workload_group_name: str, workload_classifier_name: str, **kwargs: Any) -> WorkloadClassifier

Parameters

Name Description
resource_group_name
Required
str

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.

server_name
Required
str

The name of the server. Required.

database_name
Required
str

The name of the database. Required.

workload_group_name
Required
str

The name of the workload group from which to receive the classifier from. Required.

workload_classifier_name
Required
str

The name of the workload classifier. Required.

Returns

Type Description

WorkloadClassifier or the result of cls(response)

Exceptions

Type Description

list_by_workload_group

Gets the list of workload classifiers for a workload group.

list_by_workload_group(resource_group_name: str, server_name: str, database_name: str, workload_group_name: str, **kwargs: Any) -> AsyncItemPaged[WorkloadClassifier]

Parameters

Name Description
resource_group_name
Required
str

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.

server_name
Required
str

The name of the server. Required.

database_name
Required
str

The name of the database. Required.

workload_group_name
Required
str

The name of the workload group from which to receive the classifiers from. Required.

Returns

Type Description

An iterator like instance of either WorkloadClassifier 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'>