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.objectVirtualMachineScaleSetVMsOperations
Constructor
VirtualMachineScaleSetVMsOperations(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_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 |
Performs maintenance on a virtual machine in 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_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. |
| retrieve_boot_diagnostics_data |
The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. |
| simulate_eviction |
The operation to simulate the eviction of spot virtual machine in a VM scale set. |
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[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
Deletes a virtual machine from a VM scale set.
async begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, force_deletion: Optional[bool] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- force_deletion
- bool
Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview).
- 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
Performs maintenance on a virtual machine in a VM scale set.
async begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, instance_id: 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_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, skip_shutdown: Optional[bool] = False, **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.
- 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 the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on.
async begin_redeploy(resource_group_name: str, vm_scale_set_name: str, instance_id: 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_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, vm_scale_set_vm_reimage_input: Optional[azure.mgmt.compute.v2021_04_01.models._models_py3.VirtualMachineScaleSetVMReimageParameters] = None, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- vm_scale_set_vm_reimage_input
- VirtualMachineScaleSetVMReimageParameters
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
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[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_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[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_run_command
Run command on a virtual machine in a VM scale set.
async begin_run_command(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: azure.mgmt.compute.v2021_04_01.models._models_py3.RunCommandInput, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2021_04_01.models._models_py3.RunCommandResult]
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 RunCommandResult 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[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_update
Updates a virtual machine of a VM scale set.
async begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: azure.mgmt.compute.v2021_04_01.models._models_py3.VirtualMachineScaleSetVM, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2021_04_01.models._models_py3.VirtualMachineScaleSetVM]
Parameters
- vm_scale_set_name
- str
The name of the VM scale set where the extension should be create or updated.
- parameters
- VirtualMachineScaleSetVM
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
get
Gets a virtual machine from a VM scale set.
async get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, expand: Optional[Union[str, azure.mgmt.compute.v2021_04_01.models._compute_management_client_enums.InstanceViewTypes]] = None, **kwargs: Any) -> azure.mgmt.compute.v2021_04_01.models._models_py3.VirtualMachineScaleSetVM
Parameters
- expand
- str or InstanceViewTypes
The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData 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.v2021_04_01.models._models_py3.VirtualMachineScaleSetVMInstanceView
Parameters
- 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.v2021_04_01.models._models_py3.VirtualMachineScaleSetVMListResult]
Parameters
- filter
- str
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
The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.
- expand
- str
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
retrieve_boot_diagnostics_data
The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set.
async retrieve_boot_diagnostics_data(resource_group_name: str, vm_scale_set_name: str, instance_id: str, sas_uri_expiration_time_in_minutes: Optional[int] = None, **kwargs: Any) -> azure.mgmt.compute.v2021_04_01.models._models_py3.RetrieveBootDiagnosticsDataResult
Parameters
- sas_uri_expiration_time_in_minutes
- int
Expiration duration in minutes for the SAS URIs with
a value between 1 to 1440 minutes. <br>:code:>><<<br>NOTE: If not specified, SAS URIs
will be generated with a default expiration duration of 120 minutes.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RetrieveBootDiagnosticsDataResult, or the result of cls(response)
Return type
Exceptions
simulate_eviction
The operation to simulate the eviction of spot virtual machine in a VM scale set.
async simulate_eviction(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> None
Parameters
- 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
Attributes
models
models = <module 'azure.mgmt.compute.v2021_04_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2021_04_01\\models\\__init__.py'>
Feedback
Submit and view feedback for