azure.mgmt.compute.v2024_07_01.operations module

class azure.mgmt.compute.v2024_07_01.operations.AvailabilitySetsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s availability_sets attribute.

create_or_update(resource_group_name: str, availability_set_name: str, parameters: _models.AvailabilitySet, *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet[source]
create_or_update(resource_group_name: str, availability_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet

Create or update an availability set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

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

Returns:

AvailabilitySet or the result of cls(response)

Return type:

AvailabilitySet

Raises:

HttpResponseError

delete(resource_group_name: str, availability_set_name: str, **kwargs: Any) None[source]

Delete an availability set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, availability_set_name: str, **kwargs: Any) AvailabilitySet[source]

Retrieves information about an availability set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

Returns:

AvailabilitySet or the result of cls(response)

Return type:

AvailabilitySet

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[AvailabilitySet][source]

Lists all availability sets in a resource group.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[AvailabilitySet]

Raises:

HttpResponseError

list_available_sizes(resource_group_name: str, availability_set_name: str, **kwargs: Any) Iterable[VirtualMachineSize][source]

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

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineSize]

Raises:

HttpResponseError

list_by_subscription(*, expand: str | None = None, **kwargs: Any) Iterable[AvailabilitySet][source]

Lists all availability sets in a subscription.

Keyword Arguments:

expand (str) – The expand expression to apply to the operation. Allowed values are ‘virtualMachines/$ref’. Default value is None.

Returns:

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

Return type:

ItemPaged[AvailabilitySet]

Raises:

HttpResponseError

update(resource_group_name: str, availability_set_name: str, parameters: _models.AvailabilitySetUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet[source]
update(resource_group_name: str, availability_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet

Update an availability set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

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

Returns:

AvailabilitySet or the result of cls(response)

Return type:

AvailabilitySet

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.CapacityReservationGroupsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s capacity_reservation_groups attribute.

create_or_update(resource_group_name: str, capacity_reservation_group_name: str, parameters: _models.CapacityReservationGroup, *, content_type: str = 'application/json', **kwargs: Any) _models.CapacityReservationGroup[source]
create_or_update(resource_group_name: str, capacity_reservation_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.CapacityReservationGroup

The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. Please refer to https://aka.ms/CapacityReservation for more details.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

  • parameters (CapacityReservationGroup or IO[bytes]) – Parameters supplied to the Create capacity reservation Group. Is either a CapacityReservationGroup type or a IO[bytes] type. Required.

Returns:

CapacityReservationGroup or the result of cls(response)

Return type:

CapacityReservationGroup

Raises:

HttpResponseError

delete(resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) None[source]

The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, capacity_reservation_group_name: str, *, expand: str | CapacityReservationGroupInstanceViewTypes | None = None, **kwargs: Any) CapacityReservationGroup[source]

The operation that retrieves information about a capacity reservation group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

Keyword Arguments:

expand (str or CapacityReservationGroupInstanceViewTypes) – The expand expression to apply on the operation. ‘InstanceView’ will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations. “instanceView” Default value is None.

Returns:

CapacityReservationGroup or the result of cls(response)

Return type:

CapacityReservationGroup

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, *, expand: str | ExpandTypesForGetCapacityReservationGroups | None = None, **kwargs: Any) Iterable[CapacityReservationGroup][source]

Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Keyword Arguments:

expand (str or ExpandTypesForGetCapacityReservationGroups) – The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response. Known values are: “virtualMachineScaleSetVMs/$ref” and “virtualMachines/$ref”. Default value is None.

Returns:

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

Return type:

ItemPaged[CapacityReservationGroup]

Raises:

HttpResponseError

list_by_subscription(*, expand: str | ExpandTypesForGetCapacityReservationGroups | None = None, resource_ids_only: str | ResourceIdOptionsForGetCapacityReservationGroups | None = None, **kwargs: Any) Iterable[CapacityReservationGroup][source]

Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.

Keyword Arguments:
  • expand (str or ExpandTypesForGetCapacityReservationGroups) – The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response. Known values are: “virtualMachineScaleSetVMs/$ref” and “virtualMachines/$ref”. Default value is None.

  • resource_ids_only (str or ResourceIdOptionsForGetCapacityReservationGroups) – The query option to fetch Capacity Reservation Group Resource Ids. <br> ‘CreatedInSubscription’ enables fetching Resource Ids for all capacity reservation group resources created in the subscription. <br> ‘SharedWithSubscription’ enables fetching Resource Ids for all capacity reservation group resources shared with the subscription. <br> ‘All’ enables fetching Resource Ids for all capacity reservation group resources shared with the subscription and created in the subscription. Known values are: “CreatedInSubscription”, “SharedWithSubscription”, and “All”. Default value is None.

Returns:

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

Return type:

ItemPaged[CapacityReservationGroup]

Raises:

HttpResponseError

update(resource_group_name: str, capacity_reservation_group_name: str, parameters: _models.CapacityReservationGroupUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.CapacityReservationGroup[source]
update(resource_group_name: str, capacity_reservation_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.CapacityReservationGroup

The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

  • parameters (CapacityReservationGroupUpdate or IO[bytes]) – Parameters supplied to the Update capacity reservation Group operation. Is either a CapacityReservationGroupUpdate type or a IO[bytes] type. Required.

Returns:

CapacityReservationGroup or the result of cls(response)

Return type:

CapacityReservationGroup

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.CapacityReservationsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s capacity_reservations attribute.

begin_create_or_update(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, parameters: _models.CapacityReservation, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CapacityReservation][source]
begin_create_or_update(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CapacityReservation]

The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

  • capacity_reservation_name (str) – The name of the capacity reservation. Required.

  • parameters (CapacityReservation or IO[bytes]) – Parameters supplied to the Create capacity reservation. Is either a CapacityReservation type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either CapacityReservation or the result of cls(response)

Return type:

LROPoller[CapacityReservation]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

  • capacity_reservation_name (str) – The name of the capacity reservation. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, parameters: _models.CapacityReservationUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CapacityReservation][source]
begin_update(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CapacityReservation]

The operation to update a capacity reservation.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

  • capacity_reservation_name (str) – The name of the capacity reservation. Required.

  • parameters (CapacityReservationUpdate or IO[bytes]) – Parameters supplied to the Update capacity reservation operation. Is either a CapacityReservationUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either CapacityReservation or the result of cls(response)

Return type:

LROPoller[CapacityReservation]

Raises:

HttpResponseError

get(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, *, expand: str | CapacityReservationInstanceViewTypes | None = None, **kwargs: Any) CapacityReservation[source]

The operation that retrieves information about the capacity reservation.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

  • capacity_reservation_name (str) – The name of the capacity reservation. Required.

Keyword Arguments:

expand (str or CapacityReservationInstanceViewTypes) – The expand expression to apply on the operation. ‘InstanceView’ retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations. “instanceView” Default value is None.

Returns:

CapacityReservation or the result of cls(response)

Return type:

CapacityReservation

Raises:

HttpResponseError

list_by_capacity_reservation_group(resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) Iterable[CapacityReservation][source]

Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • capacity_reservation_group_name (str) – The name of the capacity reservation group. Required.

Returns:

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

Return type:

ItemPaged[CapacityReservation]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.DedicatedHostGroupsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s dedicated_host_groups attribute.

create_or_update(resource_group_name: str, host_group_name: str, parameters: _models.DedicatedHostGroup, *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup[source]
create_or_update(resource_group_name: str, host_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup

Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596).

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • parameters (DedicatedHostGroup or IO[bytes]) – Parameters supplied to the Create Dedicated Host Group. Is either a DedicatedHostGroup type or a IO[bytes] type. Required.

Returns:

DedicatedHostGroup or the result of cls(response)

Return type:

DedicatedHostGroup

Raises:

HttpResponseError

delete(resource_group_name: str, host_group_name: str, **kwargs: Any) None[source]

Delete a dedicated host group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, host_group_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) DedicatedHostGroup[source]

Retrieves information about a dedicated host group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

Keyword Arguments:

expand (str or InstanceViewTypes) – The expand expression to apply on the operation. ‘InstanceView’ will retrieve the list of instance views of the dedicated hosts under the dedicated host group. ‘UserData’ is not supported for dedicated host group. Known values are: “instanceView” and “userData”. Default value is None.

Returns:

DedicatedHostGroup or the result of cls(response)

Return type:

DedicatedHostGroup

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[DedicatedHostGroup][source]

Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[DedicatedHostGroup]

Raises:

HttpResponseError

list_by_subscription(**kwargs: Any) Iterable[DedicatedHostGroup][source]

Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups.

Returns:

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

Return type:

ItemPaged[DedicatedHostGroup]

Raises:

HttpResponseError

update(resource_group_name: str, host_group_name: str, parameters: _models.DedicatedHostGroupUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup[source]
update(resource_group_name: str, host_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup

Update an dedicated host group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • parameters (DedicatedHostGroupUpdate or IO[bytes]) – Parameters supplied to the Update Dedicated Host Group operation. Is either a DedicatedHostGroupUpdate type or a IO[bytes] type. Required.

Returns:

DedicatedHostGroup or the result of cls(response)

Return type:

DedicatedHostGroup

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.DedicatedHostsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s dedicated_hosts attribute.

begin_create_or_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: _models.DedicatedHost, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost][source]
begin_create_or_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost]

Create or update a dedicated host .

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host . Required.

  • parameters (DedicatedHost or IO[bytes]) – Parameters supplied to the Create Dedicated Host. Is either a DedicatedHost type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either DedicatedHost or the result of cls(response)

Return type:

LROPoller[DedicatedHost]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any) LROPoller[None][source]

Delete a dedicated host.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any) LROPoller[None][source]

Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any) LROPoller[None][source]

Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: _models.DedicatedHostUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost][source]
begin_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost]

Update a dedicated host .

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host . Required.

  • parameters (DedicatedHostUpdate or IO[bytes]) – Parameters supplied to the Update Dedicated Host operation. Is either a DedicatedHostUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either DedicatedHost or the result of cls(response)

Return type:

LROPoller[DedicatedHost]

Raises:

HttpResponseError

get(resource_group_name: str, host_group_name: str, host_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) DedicatedHost[source]

Retrieves information about a dedicated host.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Keyword Arguments:

expand (str or InstanceViewTypes) – The expand expression to apply on the operation. ‘InstanceView’ will retrieve the list of instance views of the dedicated host. ‘UserData’ is not supported for dedicated host. Known values are: “instanceView” and “userData”. Default value is None.

Returns:

DedicatedHost or the result of cls(response)

Return type:

DedicatedHost

Raises:

HttpResponseError

list_available_sizes(resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any) Iterable[str][source]

Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Returns:

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

Return type:

ItemPaged[str]

Raises:

HttpResponseError

list_by_host_group(resource_group_name: str, host_group_name: str, **kwargs: Any) Iterable[DedicatedHost][source]

Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • host_group_name (str) – The name of the dedicated host group. Required.

Returns:

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

Return type:

ItemPaged[DedicatedHost]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.ImagesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s images attribute.

begin_create_or_update(resource_group_name: str, image_name: str, parameters: _models.Image, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.Image][source]
begin_create_or_update(resource_group_name: str, image_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.Image]

Create or update an image.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • image_name (str) – The name of the image. Required.

  • parameters (Image or IO[bytes]) – Parameters supplied to the Create Image operation. Is either a Image type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either Image or the result of cls(response)

Return type:

LROPoller[Image]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, image_name: str, **kwargs: Any) LROPoller[None][source]

Deletes an Image.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • image_name (str) – The name of the image. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, image_name: str, parameters: _models.ImageUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.Image][source]
begin_update(resource_group_name: str, image_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.Image]

Update an image.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • image_name (str) – The name of the image. Required.

  • parameters (ImageUpdate or IO[bytes]) – Parameters supplied to the Update Image operation. Is either a ImageUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either Image or the result of cls(response)

Return type:

LROPoller[Image]

Raises:

HttpResponseError

get(resource_group_name: str, image_name: str, *, expand: str | None = None, **kwargs: Any) Image[source]

Gets an image.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • image_name (str) – The name of the image. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

Image or the result of cls(response)

Return type:

Image

Raises:

HttpResponseError

list(**kwargs: Any) Iterable[Image][source]

Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.

Returns:

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

Return type:

ItemPaged[Image]

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[Image][source]

Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[Image]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.LogAnalyticsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s log_analytics attribute.

begin_export_request_rate_by_interval(location: str, parameters: _models.RequestRateByIntervalInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult][source]
begin_export_request_rate_by_interval(location: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult]

Export logs that show Api requests made by this subscription in the given time window to show throttling activities.

Parameters:
  • location (str) – The location upon which virtual-machine-sizes is queried. Required.

  • parameters (RequestRateByIntervalInput or IO[bytes]) – Parameters supplied to the LogAnalytics getRequestRateByInterval Api. Is either a RequestRateByIntervalInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either LogAnalyticsOperationResult or the result of cls(response)

Return type:

LROPoller[LogAnalyticsOperationResult]

Raises:

HttpResponseError

begin_export_throttled_requests(location: str, parameters: _models.ThrottledRequestsInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult][source]
begin_export_throttled_requests(location: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult]

Export logs that show total throttled Api requests for this subscription in the given time window.

Parameters:
  • location (str) – The location upon which virtual-machine-sizes is queried. Required.

  • parameters (ThrottledRequestsInput or IO[bytes]) – Parameters supplied to the LogAnalytics getThrottledRequests Api. Is either a ThrottledRequestsInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either LogAnalyticsOperationResult or the result of cls(response)

Return type:

LROPoller[LogAnalyticsOperationResult]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.Operations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s operations attribute.

list(**kwargs: Any) Iterable[ComputeOperationValue][source]

Gets a list of compute operations.

Returns:

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

Return type:

ItemPaged[ComputeOperationValue]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.ProximityPlacementGroupsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s proximity_placement_groups attribute.

create_or_update(resource_group_name: str, proximity_placement_group_name: str, parameters: _models.ProximityPlacementGroup, *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup[source]
create_or_update(resource_group_name: str, proximity_placement_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup

Create or update a proximity placement group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

  • parameters (ProximityPlacementGroup or IO[bytes]) – Parameters supplied to the Create Proximity Placement Group operation. Is either a ProximityPlacementGroup type or a IO[bytes] type. Required.

Returns:

ProximityPlacementGroup or the result of cls(response)

Return type:

ProximityPlacementGroup

Raises:

HttpResponseError

delete(resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) None[source]

Delete a proximity placement group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, proximity_placement_group_name: str, *, include_colocation_status: str | None = None, **kwargs: Any) ProximityPlacementGroup[source]

Retrieves information about a proximity placement group .

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

Keyword Arguments:

include_colocation_status (str) – includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group. Default value is None.

Returns:

ProximityPlacementGroup or the result of cls(response)

Return type:

ProximityPlacementGroup

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[ProximityPlacementGroup][source]

Lists all proximity placement groups in a resource group.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[ProximityPlacementGroup]

Raises:

HttpResponseError

list_by_subscription(**kwargs: Any) Iterable[ProximityPlacementGroup][source]

Lists all proximity placement groups in a subscription.

Returns:

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

Return type:

ItemPaged[ProximityPlacementGroup]

Raises:

HttpResponseError

update(resource_group_name: str, proximity_placement_group_name: str, parameters: _models.ProximityPlacementGroupUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup[source]
update(resource_group_name: str, proximity_placement_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup

Update a proximity placement group.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

  • parameters (ProximityPlacementGroupUpdate or IO[bytes]) – Parameters supplied to the Update Proximity Placement Group operation. Is either a ProximityPlacementGroupUpdate type or a IO[bytes] type. Required.

Returns:

ProximityPlacementGroup or the result of cls(response)

Return type:

ProximityPlacementGroup

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.RestorePointCollectionsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s restore_point_collections attribute.

begin_delete(resource_group_name: str, restore_point_collection_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the restore point collection. This operation will also delete all the contained restore points.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the Restore Point Collection. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

create_or_update(resource_group_name: str, restore_point_collection_name: str, parameters: _models.RestorePointCollection, *, content_type: str = 'application/json', **kwargs: Any) _models.RestorePointCollection[source]
create_or_update(resource_group_name: str, restore_point_collection_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.RestorePointCollection

The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the restore point collection. Required.

  • parameters (RestorePointCollection or IO[bytes]) – Parameters supplied to the Create or Update restore point collection operation. Is either a RestorePointCollection type or a IO[bytes] type. Required.

Returns:

RestorePointCollection or the result of cls(response)

Return type:

RestorePointCollection

Raises:

HttpResponseError

get(resource_group_name: str, restore_point_collection_name: str, *, expand: str | RestorePointCollectionExpandOptions | None = None, **kwargs: Any) RestorePointCollection[source]

The operation to get the restore point collection.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the restore point collection. Required.

Keyword Arguments:

expand (str or RestorePointCollectionExpandOptions) – The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points in the restorePointCollection. “restorePoints” Default value is None.

Returns:

RestorePointCollection or the result of cls(response)

Return type:

RestorePointCollection

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[RestorePointCollection][source]

Gets the list of restore point collections in a resource group.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[RestorePointCollection]

Raises:

HttpResponseError

list_all(**kwargs: Any) Iterable[RestorePointCollection][source]

Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections.

Returns:

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

Return type:

ItemPaged[RestorePointCollection]

Raises:

HttpResponseError

update(resource_group_name: str, restore_point_collection_name: str, parameters: _models.RestorePointCollectionUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.RestorePointCollection[source]
update(resource_group_name: str, restore_point_collection_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.RestorePointCollection

The operation to update the restore point collection.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the restore point collection. Required.

  • parameters (RestorePointCollectionUpdate or IO[bytes]) – Parameters supplied to the Update restore point collection operation. Is either a RestorePointCollectionUpdate type or a IO[bytes] type. Required.

Returns:

RestorePointCollection or the result of cls(response)

Return type:

RestorePointCollection

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.RestorePointsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s restore_points attribute.

begin_create(resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, parameters: _models.RestorePoint, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RestorePoint][source]
begin_create(resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RestorePoint]

The operation to create the restore point. Updating properties of an existing restore point is not allowed.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the restore point collection. Required.

  • restore_point_name (str) – The name of the restore point. Required.

  • parameters (RestorePoint or IO[bytes]) – Parameters supplied to the Create restore point operation. Is either a RestorePoint type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either RestorePoint or the result of cls(response)

Return type:

LROPoller[RestorePoint]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the restore point.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the Restore Point Collection. Required.

  • restore_point_name (str) – The name of the restore point. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

get(resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, *, expand: str | RestorePointExpandOptions | None = None, **kwargs: Any) RestorePoint[source]

The operation to get the restore point.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • restore_point_collection_name (str) – The name of the restore point collection. Required.

  • restore_point_name (str) – The name of the restore point. Required.

Keyword Arguments:

expand (str or RestorePointExpandOptions) – The expand expression to apply on the operation. ‘InstanceView’ retrieves information about the run-time state of a restore point. “instanceView” Default value is None.

Returns:

RestorePoint or the result of cls(response)

Return type:

RestorePoint

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.SshPublicKeysOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s ssh_public_keys attribute.

create(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshPublicKeyResource, *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource[source]
create(resource_group_name: str, ssh_public_key_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource

Creates a new SSH public key resource.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

  • parameters (SshPublicKeyResource or IO[bytes]) – Parameters supplied to create the SSH public key. Is either a SshPublicKeyResource type or a IO[bytes] type. Required.

Returns:

SshPublicKeyResource or the result of cls(response)

Return type:

SshPublicKeyResource

Raises:

HttpResponseError

delete(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) None[source]

Delete an SSH public key.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

generate_key_pair(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshGenerateKeyPairInputParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyGenerateKeyPairResult[source]
generate_key_pair(resource_group_name: str, ssh_public_key_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyGenerateKeyPairResult

Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

  • parameters (SshGenerateKeyPairInputParameters or IO[bytes]) – Parameters supplied to generate the SSH public key. Is either a SshGenerateKeyPairInputParameters type or a IO[bytes] type. Default value is None.

Returns:

SshPublicKeyGenerateKeyPairResult or the result of cls(response)

Return type:

SshPublicKeyGenerateKeyPairResult

Raises:

HttpResponseError

get(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) SshPublicKeyResource[source]

Retrieves information about an SSH public key.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

Returns:

SshPublicKeyResource or the result of cls(response)

Return type:

SshPublicKeyResource

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[SshPublicKeyResource][source]

Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[SshPublicKeyResource]

Raises:

HttpResponseError

list_by_subscription(**kwargs: Any) Iterable[SshPublicKeyResource][source]

Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.

Returns:

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

Return type:

ItemPaged[SshPublicKeyResource]

Raises:

HttpResponseError

update(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshPublicKeyUpdateResource, *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource[source]
update(resource_group_name: str, ssh_public_key_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource

Updates a new SSH public key resource.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

  • parameters (SshPublicKeyUpdateResource or IO[bytes]) – Parameters supplied to update the SSH public key. Is either a SshPublicKeyUpdateResource type or a IO[bytes] type. Required.

Returns:

SshPublicKeyResource or the result of cls(response)

Return type:

SshPublicKeyResource

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.UsageOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s usage attribute.

list(location: str, **kwargs: Any) Iterable[Usage][source]

Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.

Parameters:

location (str) – The location for which resource usage is queried. Required.

Returns:

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

Return type:

ItemPaged[Usage]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineExtensionImagesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_extension_images attribute.

get(location: str, publisher_name: str, type: str, version: str, **kwargs: Any) VirtualMachineExtensionImage[source]

Gets a virtual machine extension image.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – Required.

  • type (str) – Required.

  • version (str) – Required.

Returns:

VirtualMachineExtensionImage or the result of cls(response)

Return type:

VirtualMachineExtensionImage

Raises:

HttpResponseError

list_types(location: str, publisher_name: str, **kwargs: Any) List[VirtualMachineExtensionImage][source]

Gets a list of virtual machine extension image types.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – Required.

Returns:

list of VirtualMachineExtensionImage or the result of cls(response)

Return type:

list[VirtualMachineExtensionImage]

Raises:

HttpResponseError

list_versions(location: str, publisher_name: str, type: str, *, filter: str | None = None, top: int | None = None, orderby: str | None = None, **kwargs: Any) List[VirtualMachineExtensionImage][source]

Gets a list of virtual machine extension image versions.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – Required.

  • type (str) – Required.

Keyword Arguments:
  • filter (str) – The filter to apply on the operation. Default value is None.

  • top (int) – Default value is None.

  • orderby (str) – Default value is None.

Returns:

list of VirtualMachineExtensionImage or the result of cls(response)

Return type:

list[VirtualMachineExtensionImage]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineExtensionsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_extensions attribute.

begin_create_or_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineExtension, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineExtension][source]
begin_create_or_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineExtension]

The operation to create or update the extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the extension should be created or updated. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • extension_parameters (VirtualMachineExtension or IO[bytes]) – Parameters supplied to the Create Virtual Machine Extension operation. Is either a VirtualMachineExtension type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineExtension]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the extension should be deleted. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineExtensionUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineExtension][source]
begin_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineExtension]

The operation to update the extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the extension should be updated. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • extension_parameters (VirtualMachineExtensionUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine Extension operation. Is either a VirtualMachineExtensionUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineExtension]

Raises:

HttpResponseError

get(resource_group_name: str, vm_name: str, vm_extension_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineExtension[source]

The operation to get the extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine containing the extension. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineExtension or the result of cls(response)

Return type:

VirtualMachineExtension

Raises:

HttpResponseError

list(resource_group_name: str, vm_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineExtensionsListResult[source]

The operation to get all extensions of a Virtual Machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine containing the extension. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineExtensionsListResult or the result of cls(response)

Return type:

VirtualMachineExtensionsListResult

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineImagesEdgeZoneOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_images_edge_zone attribute.

get(location: str, edge_zone: str, publisher_name: str, offer: str, skus: str, version: str, **kwargs: Any) VirtualMachineImage[source]

Gets a virtual machine image in an edge zone.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • edge_zone (str) – The name of the edge zone. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

  • skus (str) – A valid image SKU. Required.

  • version (str) – A valid image SKU version. Required.

Returns:

VirtualMachineImage or the result of cls(response)

Return type:

VirtualMachineImage

Raises:

HttpResponseError

list(location: str, edge_zone: str, publisher_name: str, offer: str, skus: str, *, expand: str | None = None, top: int | None = None, orderby: str | None = None, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • edge_zone (str) – The name of the edge zone. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

  • skus (str) – A valid image SKU. Required.

Keyword Arguments:
  • expand (str) – The expand expression to apply on the operation. Default value is None.

  • top (int) – An integer value specifying the number of images to return that matches supplied values. Default value is None.

  • orderby (str) – Specifies the order of the results returned. Formatted as an OData query. Default value is None.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_offers(location: str, edge_zone: str, publisher_name: str, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of virtual machine image offers for the specified location, edge zone and publisher.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • edge_zone (str) – The name of the edge zone. Required.

  • publisher_name (str) – A valid image publisher. Required.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_publishers(location: str, edge_zone: str, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of virtual machine image publishers for the specified Azure location and edge zone.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • edge_zone (str) – The name of the edge zone. Required.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_skus(location: str, edge_zone: str, publisher_name: str, offer: str, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • edge_zone (str) – The name of the edge zone. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineImagesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_images attribute.

get(location: str, publisher_name: str, offer: str, skus: str, version: str, **kwargs: Any) VirtualMachineImage[source]

Gets a virtual machine image.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

  • skus (str) – A valid image SKU. Required.

  • version (str) – A valid image SKU version. Required.

Returns:

VirtualMachineImage or the result of cls(response)

Return type:

VirtualMachineImage

Raises:

HttpResponseError

list(location: str, publisher_name: str, offer: str, skus: str, *, expand: str | None = None, top: int | None = None, orderby: str | None = None, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

  • skus (str) – A valid image SKU. Required.

Keyword Arguments:
  • expand (str) – The expand expression to apply on the operation. Default value is None.

  • top (int) – Default value is None.

  • orderby (str) – Default value is None.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_by_edge_zone(location: str, edge_zone: str, **kwargs: Any) VmImagesInEdgeZoneListResult[source]

Gets a list of all virtual machine image versions for the specified edge zone.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • edge_zone (str) – The name of the edge zone. Required.

Returns:

VmImagesInEdgeZoneListResult or the result of cls(response)

Return type:

VmImagesInEdgeZoneListResult

Raises:

HttpResponseError

list_offers(location: str, publisher_name: str, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of virtual machine image offers for the specified location and publisher.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_publishers(location: str, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of virtual machine image publishers for the specified Azure location.

Parameters:

location (str) – The name of a supported Azure region. Required.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_skus(location: str, publisher_name: str, offer: str, **kwargs: Any) List[VirtualMachineImageResource][source]

Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.

Parameters:
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineRunCommandsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_run_commands attribute.

begin_create_or_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommand, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_create_or_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to create or update the run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the run command should be created or updated. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommand or IO[bytes]) – Parameters supplied to the Create Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommand type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the run command should be deleted. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommandUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to update the run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the run command should be updated. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommandUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommandUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

get(location: str, command_id: str, **kwargs: Any) RunCommandDocument[source]

Gets specific run command for a subscription in a location.

Parameters:
  • location (str) – The location upon which run commands is queried. Required.

  • command_id (str) – The command id. Required.

Returns:

RunCommandDocument or the result of cls(response)

Return type:

RunCommandDocument

Raises:

HttpResponseError

get_by_virtual_machine(resource_group_name: str, vm_name: str, run_command_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineRunCommand[source]

The operation to get the run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine containing the run command. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineRunCommand or the result of cls(response)

Return type:

VirtualMachineRunCommand

Raises:

HttpResponseError

list(location: str, **kwargs: Any) Iterable[RunCommandDocumentBase][source]

Lists all available run commands for a subscription in a location.

Parameters:

location (str) – The location upon which run commands is queried. Required.

Returns:

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

Return type:

ItemPaged[RunCommandDocumentBase]

Raises:

HttpResponseError

list_by_virtual_machine(resource_group_name: str, vm_name: str, *, expand: str | None = None, **kwargs: Any) Iterable[VirtualMachineRunCommand][source]

The operation to get all run commands of a Virtual Machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine containing the run command. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

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

Return type:

ItemPaged[VirtualMachineRunCommand]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineScaleSetExtensionsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_set_extensions attribute.

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetExtension, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension]

The operation to create or update an extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be create or updated. Required.

  • vmss_extension_name (str) – The name of the VM scale set extension. Required.

  • extension_parameters (VirtualMachineScaleSetExtension or IO[bytes]) – Parameters supplied to the Create VM scale set Extension operation. Is either a VirtualMachineScaleSetExtension type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetExtension]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be deleted. Required.

  • vmss_extension_name (str) – The name of the VM scale set extension. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetExtensionUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension]

The operation to update an extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be updated. Required.

  • vmss_extension_name (str) – The name of the VM scale set extension. Required.

  • extension_parameters (VirtualMachineScaleSetExtensionUpdate or IO[bytes]) – Parameters supplied to the Update VM scale set Extension operation. Is either a VirtualMachineScaleSetExtensionUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetExtension]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineScaleSetExtension[source]

The operation to get the extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set containing the extension. Required.

  • vmss_extension_name (str) – The name of the VM scale set extension. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineScaleSetExtension or the result of cls(response)

Return type:

VirtualMachineScaleSetExtension

Raises:

HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) Iterable[VirtualMachineScaleSetExtension][source]

Gets a list of all extensions in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set containing the extension. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSetExtension]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineScaleSetRollingUpgradesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_set_rolling_upgrades attribute.

begin_cancel(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Cancels the current virtual machine scale set rolling upgrade.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_start_extension_upgrade(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_start_os_upgrade(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

get_latest(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) RollingUpgradeStatusInfo[source]

Gets the status of the latest virtual machine scale set rolling upgrade.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

RollingUpgradeStatusInfo or the result of cls(response)

Return type:

RollingUpgradeStatusInfo

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineScaleSetVMExtensionsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_set_vm_extensions attribute.

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetVMExtension, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension]

The operation to create or update the VMSS VM extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • extension_parameters (VirtualMachineScaleSetVMExtension or IO[bytes]) – Parameters supplied to the Create Virtual Machine Extension operation. Is either a VirtualMachineScaleSetVMExtension type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetVMExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetVMExtension]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the VMSS VM extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetVMExtensionUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension]

The operation to update the VMSS VM extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • extension_parameters (VirtualMachineScaleSetVMExtensionUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine Extension operation. Is either a VirtualMachineScaleSetVMExtensionUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetVMExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetVMExtension]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineScaleSetVMExtension[source]

The operation to get the VMSS VM extension.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineScaleSetVMExtension or the result of cls(response)

Return type:

VirtualMachineScaleSetVMExtension

Raises:

HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineScaleSetVMExtensionsListResult[source]

The operation to get all extensions of an instance in Virtual Machine Scaleset.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineScaleSetVMExtensionsListResult or the result of cls(response)

Return type:

VirtualMachineScaleSetVMExtensionsListResult

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineScaleSetVMRunCommandsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_set_vm_run_commands attribute.

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: _models.VirtualMachineRunCommand, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to create or update the VMSS VM run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommand or IO[bytes]) – Parameters supplied to the Create Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommand type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the VMSS VM run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: _models.VirtualMachineRunCommandUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to update the VMSS VM run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommandUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommandUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineRunCommand[source]

The operation to get the VMSS VM run command.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • run_command_name (str) – The name of the virtual machine run command. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

VirtualMachineRunCommand or the result of cls(response)

Return type:

VirtualMachineRunCommand

Raises:

HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, expand: str | None = None, **kwargs: Any) Iterable[VirtualMachineRunCommand][source]

The operation to get all run commands of an instance in Virtual Machine Scaleset.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. Default value is None.

Returns:

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

Return type:

ItemPaged[VirtualMachineRunCommand]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineScaleSetVMsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_set_vms attribute.

begin_approve_rolling_upgrade(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_attach_detach_data_disks(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: _models.AttachDetachDataDisksRequest, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.StorageProfile][source]
begin_attach_detach_data_disks(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.StorageProfile]

Attach and detach data disks to/from a virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • parameters (AttachDetachDataDisksRequest or IO[bytes]) – Parameters supplied to the attach and detach data disks operation on a Virtual Machine Scale Sets VM. Is either a AttachDetachDataDisksRequest type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either StorageProfile or the result of cls(response)

Return type:

LROPoller[StorageProfile]

Raises:

HttpResponseError

begin_deallocate(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, force_deletion: bool | None = None, **kwargs: Any) LROPoller[None][source]

Deletes a virtual machine from a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments:

force_deletion (bool) – Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview). Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Performs maintenance on a virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, skip_shutdown: bool = False, **kwargs: Any) LROPoller[None][source]

Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on a virtual machine that is being deallocated or already has been deallocated.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments:

skip_shutdown (bool) – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified. Default value is False.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_scale_set_vm_reimage_input: _models.VirtualMachineScaleSetVMReimageParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_scale_set_vm_reimage_input: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • vm_scale_set_vm_reimage_input (VirtualMachineScaleSetVMReimageParameters or IO[bytes]) – Parameters for the Reimaging Virtual machine in ScaleSet. Is either a VirtualMachineScaleSetVMReimageParameters type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Restarts a virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_run_command(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: _models.RunCommandInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult][source]
begin_run_command(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult]

Run command on a virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • parameters (RunCommandInput or IO[bytes]) – Parameters supplied to the Run command operation. Is either a RunCommandInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either RunCommandResult or the result of cls(response)

Return type:

LROPoller[RunCommandResult]

Raises:

HttpResponseError

begin_start(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Starts a virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: _models.VirtualMachineScaleSetVM, *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVM][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: IO[bytes], *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVM]

Updates a virtual machine of a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be create or updated. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

  • parameters (VirtualMachineScaleSetVM or IO[bytes]) – Parameters supplied to the Update Virtual Machine Scale Sets VM operation. Is either a VirtualMachineScaleSetVM type or a IO[bytes] type. Required.

Keyword Arguments:
  • if_match (str) – The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None.

  • if_none_match (str) – Set to ‘*’ to allow a new record set to be created, but to prevent updating an existing record set. Other values will result in error from server as they are not supported. Default value is None.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetVM or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetVM]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) VirtualMachineScaleSetVM[source]

Gets a virtual machine from a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments:

expand (str or InstanceViewTypes) – The expand expression to apply on the operation. ‘InstanceView’ will retrieve the instance view of the virtual machine. ‘UserData’ will retrieve the UserData of the virtual machine. Known values are: “instanceView” and “userData”. Default value is None.

Returns:

VirtualMachineScaleSetVM or the result of cls(response)

Return type:

VirtualMachineScaleSetVM

Raises:

HttpResponseError

get_instance_view(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) VirtualMachineScaleSetVMInstanceView[source]

Gets the status of a virtual machine from a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

VirtualMachineScaleSetVMInstanceView or the result of cls(response)

Return type:

VirtualMachineScaleSetVMInstanceView

Raises:

HttpResponseError

list(resource_group_name: str, virtual_machine_scale_set_name: str, *, filter: str | None = None, select: str | None = None, expand: str | None = None, **kwargs: Any) Iterable[VirtualMachineScaleSetVM][source]

Gets a list of all virtual machines in a VM scale sets.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • virtual_machine_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments:
  • filter (str) – The filter to apply to the operation. Allowed values are ‘startswith(instanceView/statuses/code, ‘PowerState’) eq true’, ‘properties/latestModelApplied eq true’, ‘properties/latestModelApplied eq false’. Default value is None.

  • select (str) – The list parameters. Allowed values are ‘instanceView’, ‘instanceView/statuses’. Default value is None.

  • expand (str) – The expand expression to apply to the operation. Allowed values are ‘instanceView’. Default value is None.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSetVM]

Raises:

HttpResponseError

retrieve_boot_diagnostics_data(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, sas_uri_expiration_time_in_minutes: int | None = None, **kwargs: Any) RetrieveBootDiagnosticsDataResult[source]

The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments:

sas_uri_expiration_time_in_minutes (int) – Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. Note: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. Default value is None.

Returns:

RetrieveBootDiagnosticsDataResult or the result of cls(response)

Return type:

RetrieveBootDiagnosticsDataResult

Raises:

HttpResponseError

simulate_eviction(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) None[source]

The operation to simulate the eviction of spot virtual machine in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineScaleSetsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_sets attribute.

begin_approve_rolling_upgrade(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_approve_rolling_upgrade(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, parameters: _models.VirtualMachineScaleSet, *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet]

Create or update a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set to create or update. Required.

  • parameters (VirtualMachineScaleSet or IO[bytes]) – The scale set object. Is either a VirtualMachineScaleSet type or a IO[bytes] type. Required.

Keyword Arguments:
  • if_match (str) – The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None.

  • if_none_match (str) – Set to ‘*’ to allow a new record set to be created, but to prevent updating an existing record set. Other values will result in error from server as they are not supported. Default value is None.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSet or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSet]

Raises:

HttpResponseError

begin_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, hibernate: bool | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, hibernate: bool | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Keyword Arguments:

hibernate (bool) – Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only). Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, *, force_deletion: bool | None = None, **kwargs: Any) LROPoller[None][source]

Deletes a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments:

force_deletion (bool) – Optional parameter to force delete a VM scale set. (Feature in Preview). Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceRequiredIDs, *, force_deletion: bool | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes], *, force_deletion: bool | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Deletes virtual machines in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceRequiredIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceRequiredIDs type or a IO[bytes] type. Required.

Keyword Arguments:

force_deletion (bool) – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview). Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, skip_shutdown: bool = False, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, skip_shutdown: bool = False, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. Additionally, this operation is not allowed on virtual machines in a VM scale set that are being deallocated or have already been deallocated.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Keyword Arguments:

skip_shutdown (bool) – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified. Default value is False.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reapply(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_redeploy(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, vm_scale_set_reimage_input: _models.VirtualMachineScaleSetReimageParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, vm_scale_set_name: str, vm_scale_set_reimage_input: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don’t have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_scale_set_reimage_input (VirtualMachineScaleSetReimageParameters or IO[bytes]) – Parameters for Reimaging VM ScaleSet. Is either a VirtualMachineScaleSetReimageParameters type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Restarts one or more virtual machines in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_set_orchestration_service_state(resource_group_name: str, vm_scale_set_name: str, parameters: _models.OrchestrationServiceStateInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_set_orchestration_service_state(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Changes ServiceState property for a given service.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the virtual machine scale set to create or update. Required.

  • parameters (OrchestrationServiceStateInput or IO[bytes]) – The input object for SetOrchestrationServiceState API. Is either a OrchestrationServiceStateInput type or a IO[bytes] type. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_start(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_start(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Starts one or more virtual machines in a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, parameters: _models.VirtualMachineScaleSetUpdate, *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet]

Update a VM scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set to create or update. Required.

  • parameters (VirtualMachineScaleSetUpdate or IO[bytes]) – The scale set object. Is either a VirtualMachineScaleSetUpdate type or a IO[bytes] type. Required.

Keyword Arguments:
  • if_match (str) – The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None.

  • if_none_match (str) – Set to ‘*’ to allow a new record set to be created, but to prevent updating an existing record set. Other values will result in error from server as they are not supported. Default value is None.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSet or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSet]

Raises:

HttpResponseError

begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceRequiredIDs, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceRequiredIDs or IO[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceRequiredIDs type or a IO[bytes] type. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

convert_to_single_placement_group(resource_group_name: str, vm_scale_set_name: str, parameters: _models.VMScaleSetConvertToSinglePlacementGroupInput, *, content_type: str = 'application/json', **kwargs: Any) None[source]
convert_to_single_placement_group(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) None

Converts SinglePlacementGroup property to false for a existing virtual machine scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the virtual machine scale set to create or update. Required.

  • parameters (VMScaleSetConvertToSinglePlacementGroupInput or IO[bytes]) – The input object for ConvertToSinglePlacementGroup API. Is either a VMScaleSetConvertToSinglePlacementGroupInput type or a IO[bytes] type. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

force_recovery_service_fabric_platform_update_domain_walk(resource_group_name: str, vm_scale_set_name: str, *, platform_update_domain: int, zone: str | None = None, placement_group_id: str | None = None, **kwargs: Any) RecoveryWalkResponse[source]

Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments:
  • platform_update_domain (int) – The platform update domain for which a manual recovery walk is requested. Required.

  • zone (str) – The zone in which the manual recovery walk is requested for cross zone virtual machine scale set. Default value is None.

  • placement_group_id (str) – The placement group id for which the manual recovery walk is requested. Default value is None.

Returns:

RecoveryWalkResponse or the result of cls(response)

Return type:

RecoveryWalkResponse

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, *, expand: str | ExpandTypesForGetVMScaleSets | None = None, **kwargs: Any) VirtualMachineScaleSet[source]

Display information about a virtual machine scale set.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments:

expand (str or ExpandTypesForGetVMScaleSets) – The expand expression to apply on the operation. ‘UserData’ retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation. “userData” Default value is None.

Returns:

VirtualMachineScaleSet or the result of cls(response)

Return type:

VirtualMachineScaleSet

Raises:

HttpResponseError

get_instance_view(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) VirtualMachineScaleSetInstanceView[source]

Gets the status of a VM scale set instance.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

VirtualMachineScaleSetInstanceView or the result of cls(response)

Return type:

VirtualMachineScaleSetInstanceView

Raises:

HttpResponseError

get_os_upgrade_history(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) Iterable[UpgradeOperationHistoricalStatusInfo][source]

Gets list of OS upgrades on a VM scale set instance.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

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

Return type:

ItemPaged[UpgradeOperationHistoricalStatusInfo]

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[VirtualMachineScaleSet][source]

Gets a list of all VM scale sets under a resource group.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSet]

Raises:

HttpResponseError

list_all(**kwargs: Any) Iterable[VirtualMachineScaleSet][source]

Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSet]

Raises:

HttpResponseError

list_by_location(location: str, **kwargs: Any) Iterable[VirtualMachineScaleSet][source]

Gets all the VM scale sets under the specified subscription for the specified location.

Parameters:

location (str) – The location for which VM scale sets under the subscription are queried. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSet]

Raises:

HttpResponseError

list_skus(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) Iterable[VirtualMachineScaleSetSku][source]

Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSetSku]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachineSizesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_sizes attribute.

list(location: str, **kwargs: Any) Iterable[VirtualMachineSize][source]

This API is deprecated. Use Resources Skus.

Parameters:

location (str) – The location upon which virtual-machine-sizes is queried. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineSize]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>
class azure.mgmt.compute.v2024_07_01.operations.VirtualMachinesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machines attribute.

begin_assess_patches(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[VirtualMachineAssessPatchesResult][source]

Assess patches on the VM.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineAssessPatchesResult or the result of cls(response)

Return type:

LROPoller[VirtualMachineAssessPatchesResult]

Raises:

HttpResponseError

begin_attach_detach_data_disks(resource_group_name: str, vm_name: str, parameters: _models.AttachDetachDataDisksRequest, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.StorageProfile][source]
begin_attach_detach_data_disks(resource_group_name: str, vm_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.StorageProfile]

Attach and detach data disks to/from the virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (AttachDetachDataDisksRequest or IO[bytes]) – Parameters supplied to the attach and detach data disks operation on the virtual machine. Is either a AttachDetachDataDisksRequest type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either StorageProfile or the result of cls(response)

Return type:

LROPoller[StorageProfile]

Raises:

HttpResponseError

begin_capture(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachineCaptureParameters, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineCaptureResult][source]
begin_capture(resource_group_name: str, vm_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineCaptureResult]

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (VirtualMachineCaptureParameters or IO[bytes]) – Parameters supplied to the Capture Virtual Machine operation. Is either a VirtualMachineCaptureParameters type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineCaptureResult or the result of cls(response)

Return type:

LROPoller[VirtualMachineCaptureResult]

Raises:

HttpResponseError

begin_convert_to_managed_disks(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_create_or_update(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachine, *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachine][source]
begin_create_or_update(resource_group_name: str, vm_name: str, parameters: IO[bytes], *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachine]

The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (VirtualMachine or IO[bytes]) – Parameters supplied to the Create Virtual Machine operation. Is either a VirtualMachine type or a IO[bytes] type. Required.

Keyword Arguments:
  • if_match (str) – The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None.

  • if_none_match (str) – Set to ‘*’ to allow a new record set to be created, but to prevent updating an existing record set. Other values will result in error from server as they are not supported. Default value is None.

Returns:

An instance of LROPoller that returns either VirtualMachine or the result of cls(response)

Return type:

LROPoller[VirtualMachine]

Raises:

HttpResponseError

begin_deallocate(resource_group_name: str, vm_name: str, *, hibernate: bool | None = None, **kwargs: Any) LROPoller[None][source]

Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments:

hibernate (bool) – Optional parameter to hibernate a virtual machine. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, *, force_deletion: bool | None = None, **kwargs: Any) LROPoller[None][source]

The operation to delete a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments:

force_deletion (bool) – Optional parameter to force delete virtual machines. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_install_patches(resource_group_name: str, vm_name: str, install_patches_input: _models.VirtualMachineInstallPatchesParameters, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineInstallPatchesResult][source]
begin_install_patches(resource_group_name: str, vm_name: str, install_patches_input: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineInstallPatchesResult]

Installs patches on the VM.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • install_patches_input (VirtualMachineInstallPatchesParameters or IO[bytes]) – Input for InstallPatches as directly received by the API. Is either a VirtualMachineInstallPatchesParameters type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineInstallPatchesResult or the result of cls(response)

Return type:

LROPoller[VirtualMachineInstallPatchesResult]

Raises:

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

The operation to perform maintenance on a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any) LROPoller[None][source]

The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. NOTE: This operation is not allowed on a virtual machine that is being deallocated or has already been deallocated.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments:

skip_shutdown (bool) – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified. Default value is False.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reapply(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

The operation to reapply a virtual machine’s state.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

Shuts down the virtual machine, moves it to a new node, and powers it back on.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachineReimageParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, vm_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimages (upgrade the operating system) a virtual machine which don’t have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (VirtualMachineReimageParameters or IO[bytes]) – Parameters supplied to the Reimage Virtual Machine operation. Is either a VirtualMachineReimageParameters type or a IO[bytes] type. Default value is None.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

The operation to restart a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_run_command(resource_group_name: str, vm_name: str, parameters: _models.RunCommandInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult][source]
begin_run_command(resource_group_name: str, vm_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult]

Run command on the VM.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (RunCommandInput or IO[bytes]) – Parameters supplied to the Run command operation. Is either a RunCommandInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either RunCommandResult or the result of cls(response)

Return type:

LROPoller[RunCommandResult]

Raises:

HttpResponseError

begin_start(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

The operation to start a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachineUpdate, *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachine][source]
begin_update(resource_group_name: str, vm_name: str, parameters: IO[bytes], *, if_match: str | None = None, if_none_match: str | None = None, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachine]

The operation to update a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (VirtualMachineUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine operation. Is either a VirtualMachineUpdate type or a IO[bytes] type. Required.

Keyword Arguments:
  • if_match (str) – The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None.

  • if_none_match (str) – Set to ‘*’ to allow a new record set to be created, but to prevent updating an existing record set. Other values will result in error from server as they are not supported. Default value is None.

Returns:

An instance of LROPoller that returns either VirtualMachine or the result of cls(response)

Return type:

LROPoller[VirtualMachine]

Raises:

HttpResponseError

generalize(resource_group_name: str, vm_name: str, **kwargs: Any) None[source]

Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to Create a managed image of a generalized VM in Azure. For Linux, please refer to How to create an image of a virtual machine or VHD.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, vm_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) VirtualMachine[source]

Retrieves information about the model view or the instance view of a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments:

expand (str or InstanceViewTypes) – The expand expression to apply on the operation. ‘InstanceView’ retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. ‘UserData’ retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation. Known values are: “instanceView” and “userData”. Default value is None.

Returns:

VirtualMachine or the result of cls(response)

Return type:

VirtualMachine

Raises:

HttpResponseError

instance_view(resource_group_name: str, vm_name: str, **kwargs: Any) VirtualMachineInstanceView[source]

Retrieves information about the run-time state of a virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

VirtualMachineInstanceView or the result of cls(response)

Return type:

VirtualMachineInstanceView

Raises:

HttpResponseError

list(resource_group_name: str, *, filter: str | None = None, expand: str | ExpandTypeForListVMs | None = None, **kwargs: Any) Iterable[VirtualMachine][source]

Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

Parameters:

resource_group_name (str) – The name of the resource group. Required.

Keyword Arguments:
  • filter (str) – The system query option to filter VMs returned in the response. Allowed value is ‘virtualMachineScaleSet/id’ eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}’. Default value is None.

  • expand (str or ExpandTypeForListVMs) – The expand expression to apply on operation. ‘instanceView’ enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. “instanceView” Default value is None.

Returns:

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

Return type:

ItemPaged[VirtualMachine]

Raises:

HttpResponseError

list_all(*, status_only: str | None = None, filter: str | None = None, expand: str | ExpandTypesForListVMs | None = None, **kwargs: Any) Iterable[VirtualMachine][source]

Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

Keyword Arguments:
  • status_only (str) – statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. Default value is None.

  • filter (str) – The system query option to filter VMs returned in the response. Allowed value is ‘virtualMachineScaleSet/id’ eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}’. Default value is None.

  • expand (str or ExpandTypesForListVMs) – The expand expression to apply on operation. ‘instanceView’ enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. “instanceView” Default value is None.

Returns:

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

Return type:

ItemPaged[VirtualMachine]

Raises:

HttpResponseError

list_available_sizes(resource_group_name: str, vm_name: str, **kwargs: Any) Iterable[VirtualMachineSize][source]

Lists all available virtual machine sizes to which the specified virtual machine can be resized.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineSize]

Raises:

HttpResponseError

list_by_location(location: str, **kwargs: Any) Iterable[VirtualMachine][source]

Gets all the virtual machines under the specified subscription for the specified location.

Parameters:

location (str) – The location for which virtual machines under the subscription are queried. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachine]

Raises:

HttpResponseError

retrieve_boot_diagnostics_data(resource_group_name: str, vm_name: str, *, sas_uri_expiration_time_in_minutes: int | None = None, **kwargs: Any) RetrieveBootDiagnosticsDataResult[source]

The operation to retrieve SAS URIs for a virtual machine’s boot diagnostic logs.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments:

sas_uri_expiration_time_in_minutes (int) – Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. Note: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. Default value is None.

Returns:

RetrieveBootDiagnosticsDataResult or the result of cls(response)

Return type:

RetrieveBootDiagnosticsDataResult

Raises:

HttpResponseError

simulate_eviction(resource_group_name: str, vm_name: str, **kwargs: Any) None[source]

The operation to simulate the eviction of spot virtual machine.

Parameters:
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2024_07_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/models/__init__.py'>