azure.mgmt.compute.v2020_06_01.operations module

class azure.mgmt.compute.v2020_06_01.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, availability_set_name: str, parameters: _models.AvailabilitySet, *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet[source]
create_or_update(resource_group_name: str, availability_set_name: str, parameters: IO[bytes], *, 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.

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

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

Returns:

AvailabilitySet or the result of cls(response)

Return type:

AvailabilitySet

Raises:

HttpResponseError

delete(resource_group_name: str, availability_set_name: str, **kwargs: Any) None[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.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, availability_set_name: str, **kwargs: Any) 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.

Returns:

AvailabilitySet or the result of cls(response)

Return type:

AvailabilitySet

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[AvailabilitySet][source]

Lists all availability sets in a resource group.

Parameters:

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

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[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.

Returns:

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

Return type:

ItemPaged[VirtualMachineSize]

Raises:

HttpResponseError

list_by_subscription(*, expand: str | None = None, **kwargs: Any) Iterable[AvailabilitySet][source]

Lists all availability sets in a subscription.

Keyword Arguments:

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

Returns:

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

Return type:

ItemPaged[AvailabilitySet]

Raises:

HttpResponseError

update(resource_group_name: str, availability_set_name: str, parameters: _models.AvailabilitySetUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet[source]
update(resource_group_name: str, availability_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.AvailabilitySet

Update 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.

  • parameters (AvailabilitySetUpdate or IO[bytes]) – Parameters supplied to the Update Availability Set operation. Is either a AvailabilitySetUpdate type or a IO[bytes] type. Required.

Returns:

AvailabilitySet or the result of cls(response)

Return type:

AvailabilitySet

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

create_or_update(resource_group_name: str, host_group_name: str, parameters: _models.DedicatedHostGroup, *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup[source]
create_or_update(resource_group_name: str, host_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup

Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596).

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

  • host_group_name (str) – The name of the dedicated host group. Required.

  • parameters (DedicatedHostGroup or IO[bytes]) – Parameters supplied to the Create Dedicated Host Group. Is either a DedicatedHostGroup type or a IO[bytes] type. Required.

Returns:

DedicatedHostGroup or the result of cls(response)

Return type:

DedicatedHostGroup

Raises:

HttpResponseError

delete(resource_group_name: str, host_group_name: str, **kwargs: Any) None[source]

Delete a dedicated host group.

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

  • host_group_name (str) – The name of the dedicated host group. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, host_group_name: str, *, expand: Literal['instanceView'] = 'instanceView', **kwargs: Any) DedicatedHostGroup[source]

Retrieves information about a dedicated host group.

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

  • host_group_name (str) – The name of the dedicated host group. Required.

Keyword Arguments:

expand (str) – The expand expression to apply on the operation. The response shows the list of instance view of the dedicated hosts under the dedicated host group. Known values are “instanceView” and None. Default value is “instanceView”.

Returns:

DedicatedHostGroup or the result of cls(response)

Return type:

DedicatedHostGroup

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[DedicatedHostGroup][source]

Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.

Parameters:

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

Returns:

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

Return type:

ItemPaged[DedicatedHostGroup]

Raises:

HttpResponseError

list_by_subscription(**kwargs: Any) Iterable[DedicatedHostGroup][source]

Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups.

Returns:

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

Return type:

ItemPaged[DedicatedHostGroup]

Raises:

HttpResponseError

update(resource_group_name: str, host_group_name: str, parameters: _models.DedicatedHostGroupUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup[source]
update(resource_group_name: str, host_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.DedicatedHostGroup

Update an dedicated host group.

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

  • host_group_name (str) – The name of the dedicated host group. Required.

  • parameters (DedicatedHostGroupUpdate or IO[bytes]) – Parameters supplied to the Update Dedicated Host Group operation. Is either a DedicatedHostGroupUpdate type or a IO[bytes] type. Required.

Returns:

DedicatedHostGroup or the result of cls(response)

Return type:

DedicatedHostGroup

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

begin_create_or_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: _models.DedicatedHost, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost][source]
begin_create_or_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost]

Create or update a dedicated host .

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

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host . Required.

  • parameters (DedicatedHost or IO[bytes]) – Parameters supplied to the Create Dedicated Host. Is either a DedicatedHost type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either DedicatedHost or the result of cls(response)

Return type:

LROPoller[DedicatedHost]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any) LROPoller[None][source]

Delete a dedicated host.

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

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: _models.DedicatedHostUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost][source]
begin_update(resource_group_name: str, host_group_name: str, host_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.DedicatedHost]

Update an dedicated host .

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

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host . Required.

  • parameters (DedicatedHostUpdate or IO[bytes]) – Parameters supplied to the Update Dedicated Host operation. Is either a DedicatedHostUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either DedicatedHost or the result of cls(response)

Return type:

LROPoller[DedicatedHost]

Raises:

HttpResponseError

get(resource_group_name: str, host_group_name: str, host_name: str, *, expand: Literal['instanceView'] = 'instanceView', **kwargs: Any) DedicatedHost[source]

Retrieves information about a dedicated host.

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

  • host_group_name (str) – The name of the dedicated host group. Required.

  • host_name (str) – The name of the dedicated host. Required.

Keyword Arguments:

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

Returns:

DedicatedHost or the result of cls(response)

Return type:

DedicatedHost

Raises:

HttpResponseError

list_by_host_group(resource_group_name: str, host_group_name: str, **kwargs: Any) Iterable[DedicatedHost][source]

Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.

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

  • host_group_name (str) – The name of the dedicated host group. Required.

Returns:

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

Return type:

ItemPaged[DedicatedHost]

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

Create or update an image.

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

  • image_name (str) – The name of the image. Required.

  • parameters (Image or IO[bytes]) – Parameters supplied to the Create Image operation. Is either a Image type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either Image or the result of cls(response)

Return type:

LROPoller[Image]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, image_name: str, **kwargs: Any) LROPoller[None][source]

Deletes an Image.

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

  • image_name (str) – The name of the image. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, image_name: str, parameters: _models.ImageUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.Image][source]
begin_update(resource_group_name: str, image_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.Image]

Update an image.

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

  • image_name (str) – The name of the image. Required.

  • parameters (ImageUpdate or IO[bytes]) – Parameters supplied to the Update Image operation. Is either a ImageUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either Image or the result of cls(response)

Return type:

LROPoller[Image]

Raises:

HttpResponseError

get(resource_group_name: str, image_name: str, *, expand: str | None = None, **kwargs: Any) Image[source]

Gets an image.

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

  • image_name (str) – The name of the image. Required.

Keyword Arguments:

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

Returns:

Image or the result of cls(response)

Return type:

Image

Raises:

HttpResponseError

list(**kwargs: Any) Iterable[Image][source]

Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.

Returns:

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

Return type:

ItemPaged[Image]

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[Image][source]

Gets the list of images under a resource group.

Parameters:

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

Returns:

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

Return type:

ItemPaged[Image]

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

begin_export_request_rate_by_interval(location: str, parameters: _models.RequestRateByIntervalInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult][source]
begin_export_request_rate_by_interval(location: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult]

Export logs that show Api requests made by this subscription in the given time window to show throttling activities.

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

  • parameters (RequestRateByIntervalInput or IO[bytes]) – Parameters supplied to the LogAnalytics getRequestRateByInterval Api. Is either a RequestRateByIntervalInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either LogAnalyticsOperationResult or the result of cls(response)

Return type:

LROPoller[LogAnalyticsOperationResult]

Raises:

HttpResponseError

begin_export_throttled_requests(location: str, parameters: _models.ThrottledRequestsInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult][source]
begin_export_throttled_requests(location: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.LogAnalyticsOperationResult]

Export logs that show total throttled Api requests for this subscription in the given time window.

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

  • parameters (ThrottledRequestsInput or IO[bytes]) – Parameters supplied to the LogAnalytics getThrottledRequests Api. Is either a ThrottledRequestsInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either LogAnalyticsOperationResult or the result of cls(response)

Return type:

LROPoller[LogAnalyticsOperationResult]

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

list(**kwargs: Any) Iterable[ComputeOperationValue][source]

Gets a list of compute operations.

Returns:

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

Return type:

ItemPaged[ComputeOperationValue]

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

create_or_update(resource_group_name: str, proximity_placement_group_name: str, parameters: _models.ProximityPlacementGroup, *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup[source]
create_or_update(resource_group_name: str, proximity_placement_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup

Create or update a proximity placement group.

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

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

  • parameters (ProximityPlacementGroup or IO[bytes]) – Parameters supplied to the Create Proximity Placement Group operation. Is either a ProximityPlacementGroup type or a IO[bytes] type. Required.

Returns:

ProximityPlacementGroup or the result of cls(response)

Return type:

ProximityPlacementGroup

Raises:

HttpResponseError

delete(resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) None[source]

Delete a proximity placement group.

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

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, proximity_placement_group_name: str, *, include_colocation_status: str | None = None, **kwargs: Any) ProximityPlacementGroup[source]

Retrieves information about a proximity placement group .

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

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

Keyword Arguments:

include_colocation_status (str) – includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group. Default value is None.

Returns:

ProximityPlacementGroup or the result of cls(response)

Return type:

ProximityPlacementGroup

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[ProximityPlacementGroup][source]

Lists all proximity placement groups in a resource group.

Parameters:

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

Returns:

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

Return type:

ItemPaged[ProximityPlacementGroup]

Raises:

HttpResponseError

list_by_subscription(**kwargs: Any) Iterable[ProximityPlacementGroup][source]

Lists all proximity placement groups in a subscription.

Returns:

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

Return type:

ItemPaged[ProximityPlacementGroup]

Raises:

HttpResponseError

update(resource_group_name: str, proximity_placement_group_name: str, parameters: _models.ProximityPlacementGroupUpdate, *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup[source]
update(resource_group_name: str, proximity_placement_group_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.ProximityPlacementGroup

Update a proximity placement group.

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

  • proximity_placement_group_name (str) – The name of the proximity placement group. Required.

  • parameters (ProximityPlacementGroupUpdate or IO[bytes]) – Parameters supplied to the Update Proximity Placement Group operation. Is either a ProximityPlacementGroupUpdate type or a IO[bytes] type. Required.

Returns:

ProximityPlacementGroup or the result of cls(response)

Return type:

ProximityPlacementGroup

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

create(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshPublicKeyResource, *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource[source]
create(resource_group_name: str, ssh_public_key_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource

Creates a new SSH public key resource.

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

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

  • parameters (SshPublicKeyResource or IO[bytes]) – Parameters supplied to create the SSH public key. Is either a SshPublicKeyResource type or a IO[bytes] type. Required.

Returns:

SshPublicKeyResource or the result of cls(response)

Return type:

SshPublicKeyResource

Raises:

HttpResponseError

delete(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) None[source]

Delete an SSH public key.

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

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

generate_key_pair(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) SshPublicKeyGenerateKeyPairResult[source]

Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.

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

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

Returns:

SshPublicKeyGenerateKeyPairResult or the result of cls(response)

Return type:

SshPublicKeyGenerateKeyPairResult

Raises:

HttpResponseError

get(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) SshPublicKeyResource[source]

Retrieves information about an SSH public key.

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

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

Returns:

SshPublicKeyResource or the result of cls(response)

Return type:

SshPublicKeyResource

Raises:

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[SshPublicKeyResource][source]

Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.

Parameters:

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

Returns:

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

Return type:

ItemPaged[SshPublicKeyResource]

Raises:

HttpResponseError

list_by_subscription(**kwargs: Any) Iterable[SshPublicKeyResource][source]

Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.

Returns:

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

Return type:

ItemPaged[SshPublicKeyResource]

Raises:

HttpResponseError

update(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshPublicKeyUpdateResource, *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource[source]
update(resource_group_name: str, ssh_public_key_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) _models.SshPublicKeyResource

Updates a new SSH public key resource.

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

  • ssh_public_key_name (str) – The name of the SSH public key. Required.

  • parameters (SshPublicKeyUpdateResource or IO[bytes]) – Parameters supplied to update the SSH public key. Is either a SshPublicKeyUpdateResource type or a IO[bytes] type. Required.

Returns:

SshPublicKeyResource or the result of cls(response)

Return type:

SshPublicKeyResource

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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[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.

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.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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) 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.

Returns:

VirtualMachineExtensionImage or the result of cls(response)

Return type:

VirtualMachineExtensionImage

Raises:

HttpResponseError

list_types(location: str, publisher_name: str, **kwargs: Any) List[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.

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: str | None = None, top: int | None = None, orderby: str | None = None, **kwargs: Any) List[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.

Keyword Arguments:
  • 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.

Returns:

list of VirtualMachineExtensionImage or the result of cls(response)

Return type:

list[VirtualMachineExtensionImage]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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[bytes], *, 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[bytes]) – Parameters supplied to the Create Virtual Machine Extension operation. Is either a VirtualMachineExtension type or a IO[bytes] type. Required.

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) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

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[bytes], *, 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[bytes]) – Parameters supplied to the Update Virtual Machine Extension operation. Is either a VirtualMachineExtensionUpdate type or a IO[bytes] type. Required.

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: str | None = None, **kwargs: Any) 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.

Keyword Arguments:

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

Returns:

VirtualMachineExtension or the result of cls(response)

Return type:

VirtualMachineExtension

Raises:

HttpResponseError

list(resource_group_name: str, vm_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineExtensionsListResult[source]

The operation to get all extensions 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 containing the extension. Required.

Keyword Arguments:

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

Returns:

VirtualMachineExtensionsListResult or the result of cls(response)

Return type:

VirtualMachineExtensionsListResult

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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) 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.

Returns:

VirtualMachineImage or the result of cls(response)

Return type:

VirtualMachineImage

Raises:

HttpResponseError

list(location: str, publisher_name: str, offer: str, skus: str, *, expand: str | None = None, top: int | None = None, orderby: str | None = None, **kwargs: Any) List[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.

Keyword Arguments:
  • 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.

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[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.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

list_publishers(location: str, **kwargs: Any) List[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.

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[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.

Returns:

list of VirtualMachineImageResource or the result of cls(response)

Return type:

list[VirtualMachineImageResource]

Raises:

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

begin_create_or_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommand, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_create_or_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to create or update the run command.

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

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

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommand or IO[bytes]) – Parameters supplied to the Create Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommand type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the run command.

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

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

  • run_command_name (str) – The name of the virtual machine run command. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommandUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to update the run command.

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

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

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommandUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommandUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

get(location: str, command_id: str, **kwargs: Any) RunCommandDocument[source]

Gets specific run command for a subscription in a location.

Parameters:
  • location (str) – The location upon which run commands is queried. Required.

  • command_id (str) – The command id. Required.

Returns:

RunCommandDocument or the result of cls(response)

Return type:

RunCommandDocument

Raises:

HttpResponseError

get_by_virtual_machine(resource_group_name: str, vm_name: str, run_command_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineRunCommand[source]

The operation to get the run command.

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

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

  • run_command_name (str) – The name of the virtual machine run command. Required.

Keyword Arguments:

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

Returns:

VirtualMachineRunCommand or the result of cls(response)

Return type:

VirtualMachineRunCommand

Raises:

HttpResponseError

list(location: str, **kwargs: Any) Iterable[RunCommandDocumentBase][source]

Lists all available run commands for a subscription in a location.

Parameters:

location (str) – The location upon which run commands is queried. Required.

Returns:

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

Return type:

ItemPaged[RunCommandDocumentBase]

Raises:

HttpResponseError

list_by_virtual_machine(resource_group_name: str, vm_name: str, *, expand: str | None = None, **kwargs: Any) Iterable[VirtualMachineRunCommand][source]

The operation to get all run commands 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 containing the run command. Required.

Keyword Arguments:

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

Returns:

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

Return type:

ItemPaged[VirtualMachineRunCommand]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetExtensionsOperations(*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_extensions attribute.

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetExtension, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension]

The operation to create or update an extension.

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

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be create or updated. Required.

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

  • extension_parameters (VirtualMachineScaleSetExtension or IO[bytes]) – Parameters supplied to the Create VM scale set Extension operation. Is either a VirtualMachineScaleSetExtension type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetExtension]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the extension.

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

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be deleted. Required.

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

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetExtensionUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetExtension]

The operation to update an extension.

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

  • vm_scale_set_name (str) – The name of the VM scale set where the extension should be updated. Required.

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

  • extension_parameters (VirtualMachineScaleSetExtensionUpdate or IO[bytes]) – Parameters supplied to the Update VM scale set Extension operation. Is either a VirtualMachineScaleSetExtensionUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetExtension]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineScaleSetExtension[source]

The operation to get the extension.

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

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

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

Keyword Arguments:

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

Returns:

VirtualMachineScaleSetExtension or the result of cls(response)

Return type:

VirtualMachineScaleSetExtension

Raises:

HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) Iterable[VirtualMachineScaleSetExtension][source]

Gets a list of all extensions 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 containing the extension. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSetExtension]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetRollingUpgradesOperations(*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_rolling_upgrades attribute.

begin_cancel(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Cancels the current virtual machine scale set rolling upgrade.

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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_start_extension_upgrade(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.

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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_start_os_upgrade(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][source]

Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.

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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

get_latest(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) RollingUpgradeStatusInfo[source]

Gets the status of the latest virtual machine scale set rolling upgrade.

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.

Returns:

RollingUpgradeStatusInfo or the result of cls(response)

Return type:

RollingUpgradeStatusInfo

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMExtensionsOperations(*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_vm_extensions attribute.

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetVMExtension, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension]

The operation to create or update the VMSS VM extension.

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.

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

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

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetVMExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetVMExtension]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the VMSS VM extension.

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.

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

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: _models.VirtualMachineScaleSetVMExtensionUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, extension_parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVMExtension]

The operation to update the VMSS VM extension.

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.

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

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

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetVMExtension or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetVMExtension]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineScaleSetVMExtension[source]

The operation to get the VMSS VM extension.

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.

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

Keyword Arguments:

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

Returns:

VirtualMachineScaleSetVMExtension or the result of cls(response)

Return type:

VirtualMachineScaleSetVMExtension

Raises:

HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineScaleSetVMExtensionsListResult[source]

The operation to get all extensions of an instance in Virtual Machine Scaleset.

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:

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

Returns:

VirtualMachineScaleSetVMExtensionsListResult or the result of cls(response)

Return type:

VirtualMachineScaleSetVMExtensionsListResult

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMRunCommandsOperations(*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_vm_run_commands attribute.

begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: _models.VirtualMachineRunCommand, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to create or update the VMSS VM run command.

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.

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommand or IO[bytes]) – Parameters supplied to the Create Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommand type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any) LROPoller[None][source]

The operation to delete the VMSS VM run command.

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.

  • run_command_name (str) – The name of the virtual machine run command. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: _models.VirtualMachineRunCommandUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, run_command: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineRunCommand]

The operation to update the VMSS VM run command.

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.

  • run_command_name (str) – The name of the virtual machine run command. Required.

  • run_command (VirtualMachineRunCommandUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommandUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type:

LROPoller[VirtualMachineRunCommand]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, *, expand: str | None = None, **kwargs: Any) VirtualMachineRunCommand[source]

The operation to get the VMSS VM run command.

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.

  • run_command_name (str) – The name of the virtual machine run command. Required.

Keyword Arguments:

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

Returns:

VirtualMachineRunCommand or the result of cls(response)

Return type:

VirtualMachineRunCommand

Raises:

HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, expand: str | None = None, **kwargs: Any) Iterable[VirtualMachineRunCommand][source]

The operation to get all run commands of an instance in Virtual Machine Scaleset.

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:

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

Returns:

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

Return type:

ItemPaged[VirtualMachineRunCommand]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

Performs maintenance on 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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, skip_shutdown: bool = False, **kwargs: Any) LROPoller[None][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:

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. Default value is False.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

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

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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_scale_set_vm_reimage_input: _models.VirtualMachineScaleSetVMReimageParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_scale_set_vm_reimage_input: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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.

  • vm_scale_set_vm_reimage_input (VirtualMachineScaleSetVMReimageParameters or IO[bytes]) – Parameters for the Reimaging Virtual machine in ScaleSet. Is either a VirtualMachineScaleSetVMReimageParameters type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][source]

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.

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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_run_command(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: _models.RunCommandInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult][source]
begin_run_command(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult]

Run command on 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.

  • parameters (RunCommandInput or IO[bytes]) – Parameters supplied to the Run command operation. Is either a RunCommandInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either RunCommandResult or the result of cls(response)

Return type:

LROPoller[RunCommandResult]

Raises:

HttpResponseError

begin_start(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: _models.VirtualMachineScaleSetVM, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVM][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSetVM]

Updates a virtual machine of 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 where the extension should be create or updated. Required.

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

  • parameters (VirtualMachineScaleSetVM or IO[bytes]) – Parameters supplied to the Update Virtual Machine Scale Sets VM operation. Is either a VirtualMachineScaleSetVM type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSetVM or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSetVM]

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, expand: Literal['instanceView'] = 'instanceView', **kwargs: Any) 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:

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

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) 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.

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: str | None = None, select: str | None = None, expand: str | None = None, **kwargs: Any) Iterable[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.

Keyword Arguments:
  • 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.

Returns:

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

Return type:

ItemPaged[VirtualMachineScaleSetVM]

Raises:

HttpResponseError

retrieve_boot_diagnostics_data(resource_group_name: str, vm_scale_set_name: str, instance_id: str, *, sas_uri_expiration_time_in_minutes: int | None = None, **kwargs: Any) RetrieveBootDiagnosticsDataResult[source]

The operation to retrieve SAS URIs of boot diagnostic logs for 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:

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

Returns:

RetrieveBootDiagnosticsDataResult or the result of cls(response)

Return type:

RetrieveBootDiagnosticsDataResult

Raises:

HttpResponseError

simulate_eviction(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) None[source]

The operation to simulate the eviction of spot 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.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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, vm_scale_set_name: str, parameters: _models.VirtualMachineScaleSet, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet][source]
begin_create_or_update(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, 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.

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

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

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: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_deallocate(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

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[None][source]
begin_delete_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceRequiredIDs type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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.

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, skip_shutdown: bool = False, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, skip_shutdown: bool = False, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Keyword Arguments:

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. Default value is False.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_redeploy(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, vm_scale_set_reimage_input: _models.VirtualMachineScaleSetReimageParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, vm_scale_set_name: str, vm_scale_set_reimage_input: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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.

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_scale_set_reimage_input (VirtualMachineScaleSetReimageParameters or IO[bytes]) – Parameters for Reimaging VM ScaleSet. Is either a VirtualMachineScaleSetReimageParameters type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: _models.VirtualMachineScaleSetVMInstanceIDs | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

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

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_set_orchestration_service_state(resource_group_name: str, vm_scale_set_name: str, parameters: _models.OrchestrationServiceStateInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_set_orchestration_service_state(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Changes ServiceState property for a given service.

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

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

  • parameters (OrchestrationServiceStateInput or IO[bytes]) – The input object for SetOrchestrationServiceState API. Is either a OrchestrationServiceStateInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

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

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceIDs type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, vm_scale_set_name: str, parameters: _models.VirtualMachineScaleSetUpdate, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet][source]
begin_update(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachineScaleSet]

Update 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 to create or update. Required.

  • parameters (VirtualMachineScaleSetUpdate or IO[bytes]) – The scale set object. Is either a VirtualMachineScaleSetUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineScaleSet or the result of cls(response)

Return type:

LROPoller[VirtualMachineScaleSet]

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[None][source]
begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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[bytes]) – A list of virtual machine instance IDs from the VM scale set. Is either a VirtualMachineScaleSetVMInstanceRequiredIDs type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

convert_to_single_placement_group(resource_group_name: str, vm_scale_set_name: str, parameters: _models.VMScaleSetConvertToSinglePlacementGroupInput, *, content_type: str = 'application/json', **kwargs: Any) None[source]
convert_to_single_placement_group(resource_group_name: str, vm_scale_set_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) None

Converts SinglePlacementGroup property to false for a existing 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 virtual machine scale set to create or update. Required.

  • parameters (VMScaleSetConvertToSinglePlacementGroupInput or IO[bytes]) – The input object for ConvertToSinglePlacementGroup API. Is either a VMScaleSetConvertToSinglePlacementGroupInput type or a IO[bytes] type. Required.

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

force_recovery_service_fabric_platform_update_domain_walk(resource_group_name: str, vm_scale_set_name: str, *, platform_update_domain: int, **kwargs: Any) RecoveryWalkResponse[source]

Manual platform update domain walk to update virtual machines in a service fabric 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:

platform_update_domain (int) – The platform update domain for which a manual recovery walk is requested. Required.

Returns:

RecoveryWalkResponse or the result of cls(response)

Return type:

RecoveryWalkResponse

Raises:

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) 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.

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) 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.

Returns:

VirtualMachineScaleSetInstanceView or the result of cls(response)

Return type:

VirtualMachineScaleSetInstanceView

Raises:

HttpResponseError

get_os_upgrade_history(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) Iterable[UpgradeOperationHistoricalStatusInfo][source]

Gets list of OS upgrades on 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.

Returns:

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

Return type:

ItemPaged[UpgradeOperationHistoricalStatusInfo]

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[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.

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[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.

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[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.

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.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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[VirtualMachineSize][source]

This API is deprecated. Use Resources Skus.

Parameters:

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

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.v2020_06_01.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2020_06_01/models/__init__.py'>
class azure.mgmt.compute.v2020_06_01.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_assess_patches(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[VirtualMachineAssessPatchesResult][source]

Assess patches on the VM.

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

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

Returns:

An instance of LROPoller that returns either VirtualMachineAssessPatchesResult or the result of cls(response)

Return type:

LROPoller[VirtualMachineAssessPatchesResult]

Raises:

HttpResponseError

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[bytes], *, 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[bytes]) – Parameters supplied to the Capture Virtual Machine operation. Is either a VirtualMachineCaptureParameters type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachineCaptureResult or the result of cls(response)

Return type:

LROPoller[VirtualMachineCaptureResult]

Raises:

HttpResponseError

begin_convert_to_managed_disks(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

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

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

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

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[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.VirtualMachine]

The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.

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[bytes]) – Parameters supplied to the Create Virtual Machine operation. Is either a VirtualMachine type or a IO[bytes] type. Required.

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) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, *, force_deletion: bool | None = None, **kwargs: Any) LROPoller[None][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:

force_deletion (bool) – Optional parameter to force delete virtual machines. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

The operation to perform maintenance on 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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any) LROPoller[None][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:

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. Default value is False.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reapply(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][source]

The operation to reapply a virtual machine’s state.

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

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

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_redeploy(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, vm_name: str, parameters: _models.VirtualMachineReimageParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, vm_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimages the virtual machine which has an ephemeral OS disk back to its initial state.

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

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

  • parameters (VirtualMachineReimageParameters or IO[bytes]) – Parameters supplied to the Reimage Virtual Machine operation. Is either a VirtualMachineReimageParameters type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_run_command(resource_group_name: str, vm_name: str, parameters: _models.RunCommandInput, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult][source]
begin_run_command(resource_group_name: str, vm_name: str, parameters: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.RunCommandResult]

Run command on the VM.

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

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

  • parameters (RunCommandInput or IO[bytes]) – Parameters supplied to the Run command operation. Is either a RunCommandInput type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either RunCommandResult or the result of cls(response)

Return type:

LROPoller[RunCommandResult]

Raises:

HttpResponseError

begin_start(resource_group_name: str, vm_name: str, **kwargs: Any) LROPoller[None][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.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

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

The operation to 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 (VirtualMachineUpdate or IO[bytes]) – Parameters supplied to the Update Virtual Machine operation. Is either a VirtualMachineUpdate type or a IO[bytes] type. Required.

Returns:

An instance of LROPoller that returns either VirtualMachine or the result of cls(response)

Return type:

LROPoller[VirtualMachine]

Raises:

HttpResponseError

generalize(resource_group_name: str, vm_name: str, **kwargs: Any) None[source]

Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`<br>`For Windows, please refer to `Create a managed image of a generalized VM in Azure <https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource>`_.:code:`<br>`For Linux, please refer to `How to create an image of a virtual machine or VHD <https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image>`_.

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

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

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

get(resource_group_name: str, vm_name: str, *, expand: Literal['instanceView'] = 'instanceView', **kwargs: Any) 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.

Keyword Arguments:

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

Returns:

VirtualMachine or the result of cls(response)

Return type:

VirtualMachine

Raises:

HttpResponseError

instance_view(resource_group_name: str, vm_name: str, **kwargs: Any) VirtualMachineInstanceView[source]

Retrieves information about the run-time state 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.

Returns:

VirtualMachineInstanceView or the result of cls(response)

Return type:

VirtualMachineInstanceView

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[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.

Returns:

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

Return type:

ItemPaged[VirtualMachine]

Raises:

HttpResponseError

list_all(*, status_only: str | None = None, **kwargs: Any) Iterable[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:

status_only (str) – statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. Default value is None.

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[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.

Returns:

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

Return type:

ItemPaged[VirtualMachineSize]

Raises:

HttpResponseError

list_by_location(location: str, **kwargs: Any) Iterable[VirtualMachine][source]

Gets all the virtual machines under the specified subscription for the specified location.

Parameters:

location (str) – The location for which virtual machines under the subscription are queried. Required.

Returns:

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

Return type:

ItemPaged[VirtualMachine]

Raises:

HttpResponseError

retrieve_boot_diagnostics_data(resource_group_name: str, vm_name: str, *, sas_uri_expiration_time_in_minutes: int | None = None, **kwargs: Any) RetrieveBootDiagnosticsDataResult[source]

The operation to retrieve SAS URIs for a virtual machine’s boot diagnostic logs.

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

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

Keyword Arguments:

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

Returns:

RetrieveBootDiagnosticsDataResult or the result of cls(response)

Return type:

RetrieveBootDiagnosticsDataResult

Raises:

HttpResponseError

simulate_eviction(resource_group_name: str, vm_name: str, **kwargs: Any) None[source]

The operation to simulate the eviction of spot virtual machine.

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

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

Returns:

None or the result of cls(response)

Return type:

None

Raises:

HttpResponseError

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