Share via


AvailabilitySetsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:availability_sets> attribute.

Constructor

AvailabilitySetsOperations(*args, **kwargs)

Methods

begin_convert_to_virtual_machine_scale_set

Create a new Flexible Virtual Machine Scale Set and migrate all the Virtual Machines in the Availability Set. This does not trigger a downtime on the Virtual Machines.

cancel_migration_to_virtual_machine_scale_set

Cancel the migration operation on an Availability Set.

create_or_update

Create or update an availability set.

delete

Delete an availability set.

get

Retrieves information about an availability set.

list

Lists all availability sets in a resource group.

list_available_sizes

Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.

list_by_subscription

Lists all availability sets in a subscription.

start_migration_to_virtual_machine_scale_set

Start migration operation on an Availability Set to move its Virtual Machines to a Virtual Machine Scale Set. This should be followed by a migrate operation on each Virtual Machine that triggers a downtime on the Virtual Machine.

update

Update an availability set.

validate_migration_to_virtual_machine_scale_set

Validates that the Virtual Machines in the Availability Set can be migrated to the provided Virtual Machine Scale Set.

begin_convert_to_virtual_machine_scale_set

Create a new Flexible Virtual Machine Scale Set and migrate all the Virtual Machines in the Availability Set. This does not trigger a downtime on the Virtual Machines.

async begin_convert_to_virtual_machine_scale_set(resource_group_name: str, availability_set_name: str, parameters: _models.ConvertToVirtualMachineScaleSetInput | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters

Parameters supplied to the migrate operation on the availability set. Is either a ConvertToVirtualMachineScaleSetInput type or a IO[bytes] type. Default value is None.

Default value: None

Returns

Type Description

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

Exceptions

Type Description

cancel_migration_to_virtual_machine_scale_set

Cancel the migration operation on an Availability Set.

async cancel_migration_to_virtual_machine_scale_set(resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

create_or_update

Create or update an availability set.

async create_or_update(resource_group_name: str, availability_set_name: str, parameters: _models.AvailabilitySet, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AvailabilitySet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters
Required

Parameters supplied to the Create Availability Set operation. Is either a AvailabilitySet type or a IO[bytes] type. Required.

Returns

Type Description

AvailabilitySet or the result of cls(response)

Exceptions

Type Description

delete

Delete an availability set.

async delete(resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Retrieves information about an availability set.

async get(resource_group_name: str, availability_set_name: str, **kwargs: Any) -> AvailabilitySet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

AvailabilitySet or the result of cls(response)

Exceptions

Type Description

list

Lists all availability sets in a resource group.

list(resource_group_name: str, **kwargs: Any) -> AsyncIterable[AvailabilitySet]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

Returns

Type Description

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

Exceptions

Type Description

list_available_sizes

Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.

list_available_sizes(resource_group_name: str, availability_set_name: str, **kwargs: Any) -> AsyncIterable[VirtualMachineSize]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

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

Exceptions

Type Description

list_by_subscription

Lists all availability sets in a subscription.

list_by_subscription(*, expand: str | None = None, **kwargs: Any) -> AsyncIterable[AvailabilitySet]

Keyword-Only Parameters

Name Description
expand
str

The expand expression to apply to the operation. Allowed values are 'virtualMachines/$ref'. Default value is None.

Default value: None

Returns

Type Description

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

Exceptions

Type Description

start_migration_to_virtual_machine_scale_set

Start migration operation on an Availability Set to move its Virtual Machines to a Virtual Machine Scale Set. This should be followed by a migrate operation on each Virtual Machine that triggers a downtime on the Virtual Machine.

async start_migration_to_virtual_machine_scale_set(resource_group_name: str, availability_set_name: str, parameters: _models.MigrateToVirtualMachineScaleSetInput, *, content_type: str = 'application/json', **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters
Required

Parameters supplied to the migrate operation on the availability set. Is either a MigrateToVirtualMachineScaleSetInput type or a IO[bytes] type. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

update

Update an availability set.

async update(resource_group_name: str, availability_set_name: str, parameters: _models.AvailabilitySetUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AvailabilitySet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters
Required

Parameters supplied to the Update Availability Set operation. Is either a AvailabilitySetUpdate type or a IO[bytes] type. Required.

Returns

Type Description

AvailabilitySet or the result of cls(response)

Exceptions

Type Description

validate_migration_to_virtual_machine_scale_set

Validates that the Virtual Machines in the Availability Set can be migrated to the provided Virtual Machine Scale Set.

async validate_migration_to_virtual_machine_scale_set(resource_group_name: str, availability_set_name: str, parameters: _models.MigrateToVirtualMachineScaleSetInput, *, content_type: str = 'application/json', **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters
Required

Parameters supplied to the migrate operation on the availability set. Is either a MigrateToVirtualMachineScaleSetInput type or a IO[bytes] type. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.compute.v2024_11_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.10\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv84\\Lib\\site-packages\\azure\\mgmt\\compute\\v2024_11_01\\models\\__init__.py'>