azure.mgmt.compute.v2015_06_15.operations module

class azure.mgmt.compute.v2015_06_15.operations.AvailabilitySetsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s availability_sets attribute.

create_or_update(resource_group_name: str, name: str, parameters: _models.AvailabilitySet, *, content_type: str = "'application/json'", **kwargs: Any)_models.AvailabilitySet[source]
create_or_update(resource_group_name: str, name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.AvailabilitySet

Create or update an availability set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • name (str) – The name of the availability set. Required.

  • parameters (AvailabilitySet or IO) – Parameters supplied to the Create Availability Set operation. Is either a AvailabilitySet type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • cls (callable) – A custom type or function that will be passed the direct response

Returns

AvailabilitySet or the result of cls(response)

Return type

AvailabilitySet

Raises

HttpResponseError

delete(resource_group_name: str, availability_set_name: str, **kwargs: Any)Optional[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

Delete an availability set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

OperationStatusResponse or None or the result of cls(response)

Return type

OperationStatusResponse or None

Raises

HttpResponseError

get(resource_group_name: str, availability_set_name: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.AvailabilitySet[source]

Retrieves information about an availability set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AvailabilitySet or the result of cls(response)

Return type

AvailabilitySet

Raises

HttpResponseError

list(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.AvailabilitySet][source]

Lists all availability sets in a resource group.

Parameters

resource_group_name (str) – The name of the resource group. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[AvailabilitySet]

Raises

HttpResponseError

list_available_sizes(resource_group_name: str, availability_set_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineSize][source]

Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • availability_set_name (str) – The name of the availability set. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineSize]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.UsageOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s usage attribute.

list(location: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.Usage][source]

Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.

Parameters

location (str) – The location for which resource usage is queried. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[Usage]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionImagesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_extension_images attribute.

get(location: str, publisher_name: str, type: str, version: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineExtensionImage[source]

Gets a virtual machine extension image.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – Required.

  • type (str) – Required.

  • version (str) – Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineExtensionImage or the result of cls(response)

Return type

VirtualMachineExtensionImage

Raises

HttpResponseError

list_types(location: str, publisher_name: str, **kwargs: Any)List[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineExtensionImage][source]

Gets a list of virtual machine extension image types.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

list of VirtualMachineExtensionImage or the result of cls(response)

Return type

list[VirtualMachineExtensionImage]

Raises

HttpResponseError

list_versions(location: str, publisher_name: str, type: str, filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any)List[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineExtensionImage][source]

Gets a list of virtual machine extension image versions.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – Required.

  • type (str) – Required.

  • filter (str) – The filter to apply on the operation. Default value is None.

  • top (int) – Default value is None.

  • orderby (str) – Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

list of VirtualMachineExtensionImage or the result of cls(response)

Return type

list[VirtualMachineExtensionImage]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_extensions attribute.

begin_create_or_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineExtension, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineExtension][source]
begin_create_or_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineExtension]

The operation to create or update the extension.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the extension should be created or updated. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • extension_parameters (VirtualMachineExtension or IO) – Parameters supplied to the Create Virtual Machine Extension operation. Is either a VirtualMachineExtension type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either VirtualMachineExtension or the result of cls(response)

Return type

LROPoller[VirtualMachineExtension]

Raises

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

The operation to delete the extension.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the extension should be deleted. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineExtensionUpdate, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineExtension][source]
begin_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineExtension]

The operation to update the extension.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine where the extension should be updated. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • extension_parameters (VirtualMachineExtensionUpdate or IO) – Parameters supplied to the Update Virtual Machine Extension operation. Is either a VirtualMachineExtensionUpdate type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either VirtualMachineExtension or the result of cls(response)

Return type

LROPoller[VirtualMachineExtension]

Raises

HttpResponseError

get(resource_group_name: str, vm_name: str, vm_extension_name: str, expand: Optional[str] = None, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineExtension[source]

The operation to get the extension.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine containing the extension. Required.

  • vm_extension_name (str) – The name of the virtual machine extension. Required.

  • expand (str) – The expand expression to apply on the operation. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineExtension or the result of cls(response)

Return type

VirtualMachineExtension

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachineImagesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_images attribute.

get(location: str, publisher_name: str, offer: str, skus: str, version: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineImage[source]

Gets a virtual machine image.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

  • skus (str) – A valid image SKU. Required.

  • version (str) – A valid image SKU version. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineImage or the result of cls(response)

Return type

VirtualMachineImage

Raises

HttpResponseError

list(location: str, publisher_name: str, offer: str, skus: str, expand: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any)List[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineImageResource][source]

Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

  • skus (str) – A valid image SKU. Required.

  • expand (str) – The expand expression to apply on the operation. Default value is None.

  • top (int) – Default value is None.

  • orderby (str) – Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

list_offers(location: str, publisher_name: str, **kwargs: Any)List[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineImageResource][source]

Gets a list of virtual machine image offers for the specified location and publisher.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

list_publishers(location: str, **kwargs: Any)List[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineImageResource][source]

Gets a list of virtual machine image publishers for the specified Azure location.

Parameters

location (str) – The name of a supported Azure region. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

list_skus(location: str, publisher_name: str, offer: str, **kwargs: Any)List[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineImageResource][source]

Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.

Parameters
  • location (str) – The name of a supported Azure region. Required.

  • publisher_name (str) – A valid image publisher. Required.

  • offer (str) – A valid image publisher offer. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetVMsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_set_vms attribute.

begin_deallocate(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

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.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

Deletes a virtual machine from a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_power_off(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

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.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

Restarts a virtual machine in a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_start(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

Starts a virtual machine in a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetVM[source]

Gets a virtual machine from a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineScaleSetVM or the result of cls(response)

Return type

VirtualMachineScaleSetVM

Raises

HttpResponseError

get_instance_view(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetVMInstanceView[source]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • instance_id (str) – The instance ID of the virtual machine. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineScaleSetVMInstanceView or the result of cls(response)

Return type

VirtualMachineScaleSetVMInstanceView

Raises

HttpResponseError

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)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetVM][source]

Gets a list of all virtual machines in a VM scale sets.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • virtual_machine_scale_set_name (str) – The name of the VM scale set. Required.

  • 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’. Default value is None.

  • select (str) – The list parameters. Allowed values are ‘instanceView’, ‘instanceView/statuses’. Default value is None.

  • expand (str) – The expand expression to apply to the operation. Allowed values are ‘instanceView’. Default value is None.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetVM]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_scale_sets attribute.

begin_create_or_update(resource_group_name: str, name: str, parameters: _models.VirtualMachineScaleSet, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineScaleSet][source]
begin_create_or_update(resource_group_name: str, name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineScaleSet]

Create or update a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • name (str) – The name of the VM scale set to create or update. Required.

  • parameters (VirtualMachineScaleSet or IO) – The scale set object. Is either a VirtualMachineScaleSet type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either VirtualMachineScaleSet or the result of cls(response)

Return type

LROPoller[VirtualMachineScaleSet]

Raises

HttpResponseError

begin_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[_models.VirtualMachineScaleSetVMInstanceIDs] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse][source]
begin_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[IO] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse]

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.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO type. Default value is None.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

Deletes a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceRequiredIDs, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse][source]
begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse]

Deletes virtual machines in a VM scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceRequiredIDs or IO) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceRequiredIDs type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[_models.VirtualMachineScaleSetVMInstanceIDs] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse][source]
begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[IO] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse]

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.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO type. Default value is None.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[_models.VirtualMachineScaleSetVMInstanceIDs] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse][source]
begin_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[IO] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO type. Default value is None.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_start(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[_models.VirtualMachineScaleSetVMInstanceIDs] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse][source]
begin_start(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[IO] = None, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs or IO) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO type. Default value is None.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceRequiredIDs, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse][source]
begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.OperationStatusResponse]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceRequiredIDs or IO) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceRequiredIDs type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSet[source]

Display information about a virtual machine scale set.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineScaleSet or the result of cls(response)

Return type

VirtualMachineScaleSet

Raises

HttpResponseError

get_instance_view(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetInstanceView[source]

Gets the status of a VM scale set instance.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachineScaleSetInstanceView or the result of cls(response)

Return type

VirtualMachineScaleSetInstanceView

Raises

HttpResponseError

list(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSet][source]

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

Parameters

resource_group_name (str) – The name of the resource group. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineScaleSet]

Raises

HttpResponseError

list_all(**kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSet][source]

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineScaleSet]

Raises

HttpResponseError

list_skus(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineScaleSetSku][source]

Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_scale_set_name (str) – The name of the VM scale set. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetSku]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachineSizesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machine_sizes attribute.

list(location: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineSize][source]

Lists all available virtual machine sizes for a subscription in a location.

Parameters

location (str) – The location upon which virtual-machine-sizes is queried. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineSize]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>
class azure.mgmt.compute.v2015_06_15.operations.VirtualMachinesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s virtual_machines attribute.

begin_capture(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachineCaptureParameters, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineCaptureResult][source]
begin_capture(resource_group_name: str, vm_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachineCaptureResult]

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (VirtualMachineCaptureParameters or IO) – Parameters supplied to the Capture Virtual Machine operation. Is either a VirtualMachineCaptureParameters type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either VirtualMachineCaptureResult or the result of cls(response)

Return type

LROPoller[VirtualMachineCaptureResult]

Raises

HttpResponseError

begin_create_or_update(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachine, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachine][source]
begin_create_or_update(resource_group_name: str, vm_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.VirtualMachine]

The operation to create or update a virtual machine.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • parameters (VirtualMachine or IO) – Parameters supplied to the Create Virtual Machine operation. Is either a VirtualMachine type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either VirtualMachine or the result of cls(response)

Return type

LROPoller[VirtualMachine]

Raises

HttpResponseError

begin_deallocate(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

The operation to delete a virtual machine.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_power_off(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_redeploy(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

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

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_restart(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

The operation to restart a virtual machine.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_start(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse][source]

The operation to start a virtual machine.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

generalize(resource_group_name: str, vm_name: str, **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.OperationStatusResponse[source]

Sets the state of the virtual machine to generalized.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

OperationStatusResponse or the result of cls(response)

Return type

OperationStatusResponse

Raises

HttpResponseError

get(resource_group_name: str, vm_name: str, expand: Literal[instanceView] = 'instanceView', **kwargs: Any)azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachine[source]

Retrieves information about the model view or the instance view of a virtual machine.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

  • expand (str) – The expand expression to apply on the operation. Known values are “instanceView” and None. Default value is “instanceView”.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

VirtualMachine or the result of cls(response)

Return type

VirtualMachine

Raises

HttpResponseError

list(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachine][source]

Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

Parameters

resource_group_name (str) – The name of the resource group. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachine]

Raises

HttpResponseError

list_all(**kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachine][source]

Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachine]

Raises

HttpResponseError

list_available_sizes(resource_group_name: str, vm_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2015_06_15.models._models_py3.VirtualMachineSize][source]

Lists all available virtual machine sizes to which the specified virtual machine can be resized.

Parameters
  • resource_group_name (str) – The name of the resource group. Required.

  • vm_name (str) – The name of the virtual machine. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[VirtualMachineSize]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2015_06_15.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2015_06_15/models/__init__.py'>