Condividi tramite


DistributedAvailabilityGroupsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SqlManagementClient's

<xref:distributed_availability_groups> attribute.

Constructor

DistributedAvailabilityGroupsOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates a distributed availability group between Sql On-Prem and Sql Managed Instance.

begin_delete

Drops a distributed availability group between Sql On-Prem and Sql Managed Instance.

begin_failover

Performs requested failover type in this distributed availability group.

begin_set_role

Sets the role for managed instance in a distributed availability group.

begin_update

Updates a distributed availability group replication mode.

get

Gets a distributed availability group info.

list_by_instance

Gets a list of a distributed availability groups in instance.

begin_create_or_update

Creates a distributed availability group between Sql On-Prem and Sql Managed Instance.

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

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.

managed_instance_name
Required
str

The name of the managed instance. Required.

distributed_availability_group_name
Required
str

The distributed availability group name. Required.

parameters
Required

The distributed availability group info. Is either a DistributedAvailabilityGroup type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete

Drops a distributed availability group between Sql On-Prem and Sql Managed Instance.

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

managed_instance_name
Required
str

The name of the managed instance. Required.

distributed_availability_group_name
Required
str

The distributed availability group name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_failover

Performs requested failover type in this distributed availability group.

async begin_failover(resource_group_name: str, managed_instance_name: str, distributed_availability_group_name: str, parameters: _models.DistributedAvailabilityGroupsFailoverRequest, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.DistributedAvailabilityGroup]

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.

managed_instance_name
Required
str

The name of the managed instance. Required.

distributed_availability_group_name
Required
str

The distributed availability group name. Required.

parameters
Required

The distributed availability group failover request parameters. Is either a DistributedAvailabilityGroupsFailoverRequest type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_set_role

Sets the role for managed instance in a distributed availability group.

async begin_set_role(resource_group_name: str, managed_instance_name: str, distributed_availability_group_name: str, parameters: _models.DistributedAvailabilityGroupSetRole, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.DistributedAvailabilityGroup]

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.

managed_instance_name
Required
str

The name of the managed instance. Required.

distributed_availability_group_name
Required
str

The distributed availability group name. Required.

parameters
Required

The distributed availability group set role request parameters. Is either a DistributedAvailabilityGroupSetRole type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_update

Updates a distributed availability group replication mode.

async begin_update(resource_group_name: str, managed_instance_name: str, distributed_availability_group_name: str, parameters: _models.DistributedAvailabilityGroup, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.DistributedAvailabilityGroup]

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.

managed_instance_name
Required
str

The name of the managed instance. Required.

distributed_availability_group_name
Required
str

The distributed availability group name. Required.

parameters
Required

The distributed availability group info. Is either a DistributedAvailabilityGroup type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

get

Gets a distributed availability group info.

async get(resource_group_name: str, managed_instance_name: str, distributed_availability_group_name: str, **kwargs: Any) -> DistributedAvailabilityGroup

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.

managed_instance_name
Required
str

The name of the managed instance. Required.

distributed_availability_group_name
Required
str

The distributed availability group name. Required.

Returns

Type Description

DistributedAvailabilityGroup or the result of cls(response)

Exceptions

Type Description

list_by_instance

Gets a list of a distributed availability groups in instance.

list_by_instance(resource_group_name: str, managed_instance_name: str, **kwargs: Any) -> AsyncItemPaged[DistributedAvailabilityGroup]

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.

managed_instance_name
Required
str

The name of the managed instance. Required.

Returns

Type Description

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