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) -> None

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_perform_maintenance

Shuts down the virtual machine in a VMScaleSet, moves it to an already updated node, and powers it back on during the self-service phase of planned maintenance.

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_redeploy

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

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_run_command

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

begin_start

Starts a virtual machine in a VM scale set.

begin_update

Updates a virtual machine of 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.

simulate_eviction

The operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will occur within 30 minutes of calling the API.

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_deallocate(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_delete

Deletes a virtual machine from a VM scale set.

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_perform_maintenance

Shuts down the virtual machine in a VMScaleSet, moves it to an already updated node, and powers it back on during the self-service phase of planned maintenance.

begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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_power_off(resource_group_name: str, vm_scale_set_name: str, instance_id: str, skip_shutdown: typing.Union[bool, NoneType] = False, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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.

skip_shutdown
bool
default value: False

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.

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_redeploy

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

begin_redeploy(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_reimage

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

begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_scale_set_vm_reimage_input: typing.Union[_ForwardRef('_models.VirtualMachineScaleSetVMReimageParameters'), NoneType] = None, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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.

vm_scale_set_vm_reimage_input
VirtualMachineScaleSetVMReimageParameters
default value: None

Parameters for the Reimaging Virtual machine in ScaleSet.

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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_reimage_all(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_restart

Restarts a virtual machine in a VM scale set.

begin_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_run_command

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

begin_run_command(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: azure.mgmt.compute.v2019_12_01.models._models_py3.RunCommandInput, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.RunCommandResult')]

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.

parameters
RunCommandInput
Required

Parameters supplied to the Run command operation.

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 RunCommandResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_start

Starts a virtual machine in a VM scale set.

begin_start(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[NoneType]

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_update

Updates a virtual machine of a VM scale set.

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: azure.mgmt.compute.v2019_12_01.models._models_py3.VirtualMachineScaleSetVM, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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 where the extension should be create or updated.

instance_id
str
Required

The instance ID of the virtual machine.

parameters
VirtualMachineScaleSetVM
Required

Parameters supplied to the Update Virtual Machine Scale Sets VM operation.

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 VirtualMachineScaleSetVM or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get

Gets a virtual machine from a VM scale set.

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, expand: typing.Union[str, NoneType] = 'instanceView', **kwargs: typing.Any) -> azure.mgmt.compute.v2019_12_01.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.

expand
str
default value: instanceView

The expand expression to apply on the operation.

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

~azure.core.exceptions.HttpResponseError

get_instance_view

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

get_instance_view(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> azure.mgmt.compute.v2019_12_01.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

~azure.core.exceptions.HttpResponseError

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: typing.Union[str, NoneType] = None, select: typing.Union[str, NoneType] = None, expand: typing.Union[str, NoneType] = None, **kwargs: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.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. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'.

select
str
default value: None

The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.

expand
str
default value: None

The expand expression to apply to the operation. Allowed values are 'instanceView'.

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

~azure.core.exceptions.HttpResponseError

simulate_eviction

The operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will occur within 30 minutes of calling the API.

simulate_eviction(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: typing.Any) -> None

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

None, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

Attributes

models

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