AvailabilitySetsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:availability_sets> attribute.

Inheritance
builtins.object
AvailabilitySetsOperations

Constructor

AvailabilitySetsOperations(*args, **kwargs)

Methods

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.

update

Update an availability set.

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 'instanceView'. Default value is None.

Returns

Type Description

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

Attributes

models

models = <module 'azure.mgmt.compute.v2020_06_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2020_06_01\\models\\__init__.py'>