VirtualMachineScaleSetsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:virtual_machine_scale_sets> attribute.

Inheritance
builtins.object
VirtualMachineScaleSetsOperations

Constructor

VirtualMachineScaleSetsOperations(*args, **kwargs)

Methods

begin_create_or_update

Create or update a VM scale set.

begin_deallocate

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.

begin_delete

Deletes a VM scale set.

begin_delete_instances

Deletes virtual machines in a VM scale set.

begin_power_off

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.

begin_reimage

Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.

begin_restart

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

begin_start

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

begin_update_instances

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

get

Display information about a virtual machine scale set.

get_instance_view

Gets the status of a VM scale set instance.

list

Gets a list of all VM scale sets under a resource group.

list_all

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.

list_skus

Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

begin_create_or_update

Create or update a VM scale set.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

name
Required
str

The name of the VM scale set to create or update. Required.

parameters
Required

The scale set object. Is either a VirtualMachineScaleSet type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_deallocate

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.

async begin_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

vm_instance_i_ds
Required

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

Type Description

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

Exceptions

Type Description

begin_delete

Deletes a VM scale set.

async begin_delete(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> AsyncLROPoller[OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_instances

Deletes virtual machines in a VM scale set.

async begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceRequiredIDs, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

vm_instance_i_ds
Required

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

Returns

Type Description

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

Exceptions

Type Description

begin_power_off

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.

async begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

vm_instance_i_ds
Required

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

Type Description

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

Exceptions

Type Description

begin_reimage

Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.

async begin_reimage(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> AsyncLROPoller[OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_restart

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

async 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) -> AsyncLROPoller[_models.OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

vm_instance_i_ds
Required

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

Type Description

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

Exceptions

Type Description

begin_start

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

async 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) -> AsyncLROPoller[_models.OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

vm_instance_i_ds
Required

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

Type Description

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

Exceptions

Type Description

begin_update_instances

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

async 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) -> AsyncLROPoller[_models.OperationStatusResponse]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

vm_instance_i_ds
Required

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

Returns

Type Description

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

Exceptions

Type Description

get

Display information about a virtual machine scale set.

async get(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> VirtualMachineScaleSet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

Returns

Type Description

VirtualMachineScaleSet or the result of cls(response)

Exceptions

Type Description

get_instance_view

Gets the status of a VM scale set instance.

async get_instance_view(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> VirtualMachineScaleSetInstanceView

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

Returns

Type Description

VirtualMachineScaleSetInstanceView or the result of cls(response)

Exceptions

Type Description

list

Gets a list of all VM scale sets under a resource group.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

Returns

Type Description

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

Exceptions

Type Description

list_all

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.

list_all(**kwargs: Any) -> AsyncIterable[VirtualMachineScaleSet]

Returns

Type Description

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

Exceptions

Type Description

list_skus

Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

list_skus(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> AsyncIterable[VirtualMachineScaleSetSku]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

vm_scale_set_name
Required
str

The name of the VM scale set. Required.

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

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