VirtualMachineScaleSetVMsOperations Class

VirtualMachineScaleSetVMsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
VirtualMachineScaleSetVMsOperations

Constructor

VirtualMachineScaleSetVMsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

begin_deallocate

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.

begin_delete

Deletes a virtual machine from a VM scale set.

begin_power_off

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.

begin_reimage

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

begin_reimage_all

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.

begin_restart

Restarts a virtual machine in a VM scale set.

begin_start

Starts a virtual machine in a VM scale set.

get

Gets a virtual machine from a VM scale set.

get_instance_view

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

list

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

begin_deallocate

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.

async begin_deallocate(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_delete

Deletes a virtual machine from a VM scale set.

async begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_power_off

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.

async begin_power_off(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_reimage

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

async begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_reimage_all

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.

async begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_restart

Restarts a virtual machine in a VM scale set.

async begin_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_start

Starts a virtual machine in a VM scale set.

async begin_start(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.OperationStatusResponse]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

get

Gets a virtual machine from a VM scale set.

async get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.mgmt.compute.v2016_04_30_preview.models._models_py3.VirtualMachineScaleSetVM

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

Returns

VirtualMachineScaleSetVM, or the result of cls(response)

Return type

Exceptions

get_instance_view

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

async get_instance_view(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> azure.mgmt.compute.v2016_04_30_preview.models._models_py3.VirtualMachineScaleSetVMInstanceView

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_scale_set_name
str
Required

The name of the VM scale set.

instance_id
str
Required

The instance ID of the virtual machine.

cls
callable

A custom type or function that will be passed the direct response

Returns

VirtualMachineScaleSetVMInstanceView, or the result of cls(response)

Return type

Exceptions

list

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

list(resource_group_name: str, virtual_machine_scale_set_name: str, filter: Optional[str] = None, select: Optional[str] = None, expand: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.compute.v2016_04_30_preview.models._models_py3.VirtualMachineScaleSetVMListResult]

Parameters

resource_group_name
str
Required

The name of the resource group.

virtual_machine_scale_set_name
str
Required

The name of the VM scale set.

filter
str
default value: None

The filter to apply to the operation.

select
str
default value: None

The list parameters.

expand
str
default value: None

The expand expression to apply to the operation.

cls
callable

A custom type or function that will be passed the direct response

Returns

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

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2016_04_30_preview\\models\\__init__.py'>