Condividi tramite


ServerAdvisorsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SqlManagementClient's

<xref:server_advisors> attribute.

Constructor

ServerAdvisorsOperations(*args, **kwargs)

Methods

get

Gets a server advisor.

list_by_server

Gets a list of server advisors.

update

Updates a server advisor.

get

Gets a server advisor.

async get(resource_group_name: str, server_name: str, advisor_name: str, **kwargs: Any) -> Advisor

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.

advisor_name
Required
str

The name of the Server Advisor. Required.

Returns

Type Description

Advisor or the result of cls(response)

Exceptions

Type Description

list_by_server

Gets a list of server advisors.

async list_by_server(resource_group_name: str, server_name: str, expand: str | None = None, **kwargs: Any) -> list[azure.mgmt.sql.models._models_py3.Advisor]

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.

expand
str

The child resources to include in the response. Default value is None.

Default value: None

Returns

Type Description

list of Advisor or the result of cls(response)

Exceptions

Type Description

update

Updates a server advisor.

async update(resource_group_name: str, server_name: str, advisor_name: str, parameters: _models.Advisor, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Advisor

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.

advisor_name
Required
str

The name of the Server Advisor. Required.

parameters
Required

The requested advisor resource state. Is either a Advisor type or a IO[bytes] type. Required.

Returns

Type Description

Advisor 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'>