VirtualMachineScaleSetsOperations Class

VirtualMachineScaleSetsOperations 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
VirtualMachineScaleSetsOperations

Constructor

VirtualMachineScaleSetsOperations(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_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.

begin_create_or_update(resource_group_name: str, name: str, parameters: azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSet, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.VirtualMachineScaleSet')]

Parameters

resource_group_name
str
Required

The name of the resource group.

name
str
Required

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

parameters
VirtualMachineScaleSet
Required

The scale set object.

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

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: typing.Union[_ForwardRef('_models.VirtualMachineScaleSetVMInstanceIDs'), NoneType] = None, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

vm_instance_i_ds
VirtualMachineScaleSetVMInstanceIDs
default value: None

A list of virtual machine instance IDs from the VM scale set.

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

~azure.core.exceptions.HttpResponseError

begin_delete

Deletes a VM scale set.

begin_delete(resource_group_name: str, vm_scale_set_name: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

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

~azure.core.exceptions.HttpResponseError

begin_delete_instances

Deletes virtual machines in a VM scale set.

begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetVMInstanceRequiredIDs, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

vm_instance_i_ds
VirtualMachineScaleSetVMInstanceRequiredIDs
Required

A list of virtual machine instance IDs from the VM scale set.

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

~azure.core.exceptions.HttpResponseError

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_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: typing.Union[_ForwardRef('_models.VirtualMachineScaleSetVMInstanceIDs'), NoneType] = None, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

vm_instance_i_ds
VirtualMachineScaleSetVMInstanceIDs
default value: None

A list of virtual machine instance IDs from the VM scale set.

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

~azure.core.exceptions.HttpResponseError

begin_reimage

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

begin_reimage(resource_group_name: str, vm_scale_set_name: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

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

~azure.core.exceptions.HttpResponseError

begin_restart

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

begin_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: typing.Union[_ForwardRef('_models.VirtualMachineScaleSetVMInstanceIDs'), NoneType] = None, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

vm_instance_i_ds
VirtualMachineScaleSetVMInstanceIDs
default value: None

A list of virtual machine instance IDs from the VM scale set.

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

~azure.core.exceptions.HttpResponseError

begin_start

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

begin_start(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: typing.Union[_ForwardRef('_models.VirtualMachineScaleSetVMInstanceIDs'), NoneType] = None, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

vm_instance_i_ds
VirtualMachineScaleSetVMInstanceIDs
default value: None

A list of virtual machine instance IDs from the VM scale set.

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

~azure.core.exceptions.HttpResponseError

begin_update_instances

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

begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetVMInstanceRequiredIDs, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.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.

vm_instance_i_ds
VirtualMachineScaleSetVMInstanceRequiredIDs
Required

A list of virtual machine instance IDs from the VM scale set.

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

~azure.core.exceptions.HttpResponseError

get

Display information about a virtual machine scale set.

get(resource_group_name: str, vm_scale_set_name: str, **kwargs: typing.Any) -> azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSet

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.

cls
callable

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

Returns

VirtualMachineScaleSet, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get_instance_view

Gets the status of a VM scale set instance.

get_instance_view(resource_group_name: str, vm_scale_set_name: str, **kwargs: typing.Any) -> azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetInstanceView

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.

cls
callable

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

Returns

VirtualMachineScaleSetInstanceView, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

list

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

list(resource_group_name: str, **kwargs: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.VirtualMachineScaleSetListResult')]

Parameters

resource_group_name
str
Required

The name of the resource group.

cls
callable

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

Returns

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

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.VirtualMachineScaleSetListWithLinkResult')]

Parameters

cls
callable

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

Returns

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

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.VirtualMachineScaleSetListSkusResult')]

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.

cls
callable

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

Returns

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

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

Attributes

models

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