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. The name is case insensitive. 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 one of the following types: ConvertToVirtualMachineScaleSetInput, JSON, IO[bytes] Default value is None.

Default value: None

Returns

Type Description

An instance of AsyncLROPoller that returns None

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. The name is case insensitive. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

None

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. The name is case insensitive. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters
Required
AvailabilitySet or <xref:JSON> or IO[bytes]

Parameters supplied to the Create Availability Set operation. Is one of the following types: AvailabilitySet, JSON, IO[bytes] Required.

Returns

Type Description

AvailabilitySet. The AvailabilitySet is compatible with MutableMapping

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. The name is case insensitive. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

None

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. The name is case insensitive. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

AvailabilitySet. The AvailabilitySet is compatible with MutableMapping

Exceptions

Type Description

list

Lists all availability sets in a resource group.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

Returns

Type Description

An iterator like instance of AvailabilitySet

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) -> AsyncItemPaged[VirtualMachineSize]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

availability_set_name
Required
str

The name of the availability set. Required.

Returns

Type Description

An iterator like instance of VirtualMachineSize

Exceptions

Type Description

list_by_subscription

Lists all availability sets in a subscription.

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

Keyword-Only Parameters

Name Description
expand
str

The expand expression to apply to the operation. Allowed values are 'instanceView'. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of AvailabilitySet

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. The name is case insensitive. 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 one of the following types: MigrateToVirtualMachineScaleSetInput, JSON, IO[bytes] Required.

Returns

Type Description

None

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. The name is case insensitive. Required.

availability_set_name
Required
str

The name of the availability set. Required.

parameters
Required
AvailabilitySetUpdate or <xref:JSON> or IO[bytes]

Parameters supplied to the Update Availability Set operation. Is one of the following types: AvailabilitySetUpdate, JSON, IO[bytes] Required.

Returns

Type Description

AvailabilitySet. The AvailabilitySet is compatible with MutableMapping

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. The name is case insensitive. 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 one of the following types: MigrateToVirtualMachineScaleSetInput, JSON, IO[bytes] Required.

Returns

Type Description

None

Exceptions

Type Description