VirtualMachineScaleSetVMsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:virtual_machine_scale_set_vms> attribute.
- Inheritance
-
builtins.objectVirtualMachineScaleSetVMsOperations
Constructor
VirtualMachineScaleSetVMsOperations(*args, **kwargs)
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_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.
begin_deallocate(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> LROPoller[OperationStatusResponse]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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: Any) -> LROPoller[OperationStatusResponse]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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, **kwargs: Any) -> LROPoller[OperationStatusResponse]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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, **kwargs: Any) -> LROPoller[OperationStatusResponse]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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: Any) -> LROPoller[OperationStatusResponse]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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: Any) -> LROPoller[OperationStatusResponse]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets a virtual machine from a VM scale set.
get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) -> VirtualMachineScaleSetVM
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
VirtualMachineScaleSetVM or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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: Any) -> VirtualMachineScaleSetVMInstanceView
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_scale_set_name
Required
|
The name of the VM scale set. Required. |
instance_id
Required
|
The instance ID of the virtual machine. Required. |
Returns
Type | Description |
---|---|
VirtualMachineScaleSetVMInstanceView or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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: str | None = None, select: str | None = None, expand: str | None = None, **kwargs: Any) -> Iterable[VirtualMachineScaleSetVM]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
virtual_machine_scale_set_name
Required
|
The name of the VM scale set. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
filter
|
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'. Default value is None. |
select
|
The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. Default value is None. |
expand
|
The expand expression to apply to the operation. Allowed values are 'instanceView'. Default value is None. |
Returns
Type | Description |
---|---|
An iterator like instance of either VirtualMachineScaleSetVM or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.compute.v2016_03_30.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2016_03_30\\models\\__init__.py'>
Azure SDK for Python