Condividi tramite


DatabaseAdvisorsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SqlManagementClient's

<xref:database_advisors> attribute.

Constructor

DatabaseAdvisorsOperations(*args, **kwargs)

Methods

get

Gets a database advisor.

list_by_database

Gets a list of database advisors.

update

Updates a database advisor.

get

Gets a database advisor.

async get(resource_group_name: str, server_name: str, database_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.

database_name
Required
str

The name of the database. Required.

advisor_name
Required
str

The name of the Database Advisor. Required.

Returns

Type Description

Advisor or the result of cls(response)

Exceptions

Type Description

list_by_database

Gets a list of database advisors.

async list_by_database(resource_group_name: str, server_name: str, database_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.

database_name
Required
str

The name of the database. 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 database advisor.

async update(resource_group_name: str, server_name: str, database_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.

database_name
Required
str

The name of the database. Required.

advisor_name
Required
str

The name of the Database 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'>