Condividi tramite


ElasticPoolsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SqlManagementClient's

<xref:elastic_pools> attribute.

Constructor

ElasticPoolsOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates an elastic pool.

begin_delete

Deletes an elastic pool.

begin_failover

Failovers an elastic pool.

begin_update

Updates an elastic pool.

get

Gets an elastic pool.

list_by_server

Gets all elastic pools in a server.

list_metric_definitions

Returns elastic pool metric definitions.

list_metrics

Returns elastic pool metrics.

begin_create_or_update

Creates or updates an elastic pool.

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

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.

elastic_pool_name
Required
str

The name of the elastic pool. Required.

parameters
Required

The elastic pool parameters. Is either a ElasticPool type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete

Deletes an elastic pool.

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

elastic_pool_name
Required
str

The name of the elastic pool. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_failover

Failovers an elastic pool.

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

elastic_pool_name
Required
str

The name of the elastic pool to failover. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_update

Updates an elastic pool.

async begin_update(resource_group_name: str, server_name: str, elastic_pool_name: str, parameters: _models.ElasticPoolUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.ElasticPool]

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.

elastic_pool_name
Required
str

The name of the elastic pool. Required.

parameters
Required

The elastic pool update parameters. Is either a ElasticPoolUpdate type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

get

Gets an elastic pool.

async get(resource_group_name: str, server_name: str, elastic_pool_name: str, **kwargs: Any) -> ElasticPool

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.

elastic_pool_name
Required
str

The name of the elastic pool. Required.

Returns

Type Description

ElasticPool or the result of cls(response)

Exceptions

Type Description

list_by_server

Gets all elastic pools in a server.

list_by_server(resource_group_name: str, server_name: str, skip: int | None = None, **kwargs: Any) -> AsyncItemPaged[ElasticPool]

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.

skip
int

The number of elements in the collection to skip. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of either ElasticPool or the result of cls(response)

Exceptions

Type Description

list_metric_definitions

Returns elastic pool metric definitions.

list_metric_definitions(resource_group_name: str, server_name: str, elastic_pool_name: str, **kwargs: Any) -> AsyncItemPaged[MetricDefinition]

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.

elastic_pool_name
Required
str

The name of the elastic pool. Required.

Returns

Type Description

An iterator like instance of either MetricDefinition or the result of cls(response)

Exceptions

Type Description

list_metrics

Returns elastic pool metrics.

list_metrics(resource_group_name: str, server_name: str, elastic_pool_name: str, filter: str, **kwargs: Any) -> AsyncItemPaged[Metric]

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.

elastic_pool_name
Required
str

The name of the elastic pool. Required.

filter
Required
str

An OData filter expression that describes a subset of metrics to return. Required.

Returns

Type Description

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