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.objectVirtualMachineScaleSetsOperations
Constructor
VirtualMachineScaleSetsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
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_perform_maintenance |
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/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. |
| 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_redeploy |
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. |
| begin_reimage |
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. |
| begin_reimage_all |
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. |
| 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 |
Update a VM scale set. |
| begin_update_instances |
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. |
| convert_to_single_placement_group |
Converts SinglePlacementGroup property to true for a existing virtual machine scale set. |
| force_recovery_service_fabric_platform_update_domain_walk |
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. |
| get |
Display information about a virtual machine scale set. |
| get_instance_view |
Gets the status of a VM scale set instance. |
| get_os_upgrade_history |
Gets list of OS upgrades on 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, vm_scale_set_name: str, parameters: azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSet, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSet]
Parameters
- 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
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: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
begin_delete
Deletes a VM scale set.
async begin_delete(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- 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
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: azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceRequiredIDs, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceRequiredIDs
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 None or the result of cls(response)
Return type
Exceptions
begin_perform_maintenance
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/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications.
async begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
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, skip_shutdown: Optional[bool] = False, vm_instance_i_ds: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- 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.
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
begin_redeploy
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
async begin_redeploy(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
begin_reimage
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.
async begin_reimage(resource_group_name: str, vm_scale_set_name: str, vm_scale_set_reimage_input: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetReimageParameters] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_scale_set_reimage_input
- VirtualMachineScaleSetReimageParameters
Parameters for Reimaging VM 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
begin_reimage_all
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
async begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
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: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
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: Optional[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceIDs
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 None or the result of cls(response)
Return type
Exceptions
begin_update
Update a VM scale set.
async begin_update(resource_group_name: str, vm_scale_set_name: str, parameters: azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetUpdate, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSet]
Parameters
- 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
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: azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetVMInstanceRequiredIDs, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_instance_i_ds
- VirtualMachineScaleSetVMInstanceRequiredIDs
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 None or the result of cls(response)
Return type
Exceptions
convert_to_single_placement_group
Converts SinglePlacementGroup property to true for a existing virtual machine scale set.
async convert_to_single_placement_group(resource_group_name: str, vm_scale_set_name: str, parameters: azure.mgmt.compute.v2019_07_01.models._models_py3.VMScaleSetConvertToSinglePlacementGroupInput, **kwargs: Any) -> None
Parameters
- parameters
- VMScaleSetConvertToSinglePlacementGroupInput
The input object for ConvertToSinglePlacementGroup API.
- 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
force_recovery_service_fabric_platform_update_domain_walk
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
async force_recovery_service_fabric_platform_update_domain_walk(resource_group_name: str, vm_scale_set_name: str, platform_update_domain: int, **kwargs: Any) -> azure.mgmt.compute.v2019_07_01.models._models_py3.RecoveryWalkResponse
Parameters
- platform_update_domain
- int
The platform update domain for which a manual recovery walk is requested.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RecoveryWalkResponse, or the result of cls(response)
Return type
Exceptions
get
Display information about a virtual machine scale set.
async get(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSet
Parameters
- 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
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) -> azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetInstanceView
Parameters
- 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
get_os_upgrade_history
Gets list of OS upgrades on a VM scale set instance.
get_os_upgrade_history(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetListOSUpgradeHistory]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either VirtualMachineScaleSetListOSUpgradeHistory or the result of cls(response)
Return type
Exceptions
list
Gets a list of all VM scale sets under a resource group.
list(resource_group_name: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetListResult]
Parameters
- 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
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[azure.mgmt.compute.v2019_07_01.models._models_py3.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
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[azure.mgmt.compute.v2019_07_01.models._models_py3.VirtualMachineScaleSetListSkusResult]
Parameters
- 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
Attributes
models
models = <module 'azure.mgmt.compute.v2019_07_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2019_07_01\\models\\__init__.py'>
Feedback
Submit and view feedback for