azure.mgmt.compute.v2017_03_30.operations module

class azure.mgmt.compute.v2017_03_30.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, *, 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) – Parameters supplied to the Create Availability Set operation. Is either a AvailabilitySet type or a IO type. Required.

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

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

Returns

AvailabilitySet or the result of cls(response)

Return type

AvailabilitySet

Raises

HttpResponseError

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

Delete an availability set.

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

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

Keyword Arguments

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

Returns

OperationStatusResponse or None or the result of cls(response)

Return type

OperationStatusResponse or None

Raises

HttpResponseError

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

Retrieves information about an availability set.

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

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

Keyword Arguments

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

Returns

AvailabilitySet or the result of cls(response)

Return type

AvailabilitySet

Raises

HttpResponseError

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

Lists all availability sets in a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[AvailabilitySet]

Raises

HttpResponseError

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

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

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

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineSize]

Raises

HttpResponseError

list_by_subscription(expand: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.AvailabilitySet][source]

Lists all availability sets in a subscription.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[AvailabilitySet]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

Creates or updates a disk.

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

  • disk_name (str) – The name of the managed disk that is being created. The name can’t be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.

  • disk (Disk or IO) – Disk object supplied in the body of the Put disk operation. Is either a Disk type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[Disk]

Raises

HttpResponseError

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

Deletes a disk.

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

  • disk_name (str) – The name of the managed disk that is being created. The name can’t be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_grant_access(resource_group_name: str, disk_name: str, grant_access_data: _models.GrantAccessData, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.AccessUri][source]
begin_grant_access(resource_group_name: str, disk_name: str, grant_access_data: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.AccessUri]

Grants access to a disk.

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

  • disk_name (str) – The name of the managed disk that is being created. The name can’t be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.

  • grant_access_data (GrantAccessData or IO) – Access data object supplied in the body of the get disk access operation. Is either a GrantAccessData type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[AccessUri]

Raises

HttpResponseError

begin_revoke_access(resource_group_name: str, disk_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][source]

Revokes access to a disk.

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

  • disk_name (str) – The name of the managed disk that is being created. The name can’t be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_update(resource_group_name: str, disk_name: str, disk: _models.DiskUpdate, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.Disk][source]
begin_update(resource_group_name: str, disk_name: str, disk: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.Disk]

Updates (patches) a disk.

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

  • disk_name (str) – The name of the managed disk that is being created. The name can’t be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.

  • disk (DiskUpdate or IO) – Disk object supplied in the body of the Patch disk operation. Is either a DiskUpdate type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[Disk]

Raises

HttpResponseError

get(resource_group_name: str, disk_name: str, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.Disk[source]

Gets information about a disk.

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

  • disk_name (str) – The name of the managed disk that is being created. The name can’t be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.

Keyword Arguments

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

Returns

Disk or the result of cls(response)

Return type

Disk

Raises

HttpResponseError

list(**kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.Disk][source]

Lists all the disks under a subscription.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[Disk]

Raises

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.Disk][source]

Lists all the disks under a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[Disk]

Raises

HttpResponseError

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[Image]

Raises

HttpResponseError

begin_delete(resource_group_name: str, image_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

get(resource_group_name: str, image_name: str, expand: Optional[str] = None, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.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.

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

Keyword Arguments

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

Returns

Image or the result of cls(response)

Return type

Image

Raises

HttpResponseError

list(**kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

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[azure.mgmt.compute.v2017_03_30.models._models_py3.Image][source]

Gets the list of images under a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[Image]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

list(**kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.ResourceSku][source]

Gets the list of Microsoft.Compute SKUs available for your Subscription.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[ResourceSku]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

Creates or updates a snapshot.

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

  • snapshot_name (str) – The name of the snapshot that is being created. The name can’t be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. Required.

  • snapshot (Snapshot or IO) – Snapshot object supplied in the body of the Put disk operation. Is either a Snapshot type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[Snapshot]

Raises

HttpResponseError

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

Deletes a snapshot.

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

  • snapshot_name (str) – The name of the snapshot that is being created. The name can’t be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. Required.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_grant_access(resource_group_name: str, snapshot_name: str, grant_access_data: _models.GrantAccessData, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.AccessUri][source]
begin_grant_access(resource_group_name: str, snapshot_name: str, grant_access_data: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.AccessUri]

Grants access to a snapshot.

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

  • snapshot_name (str) – The name of the snapshot that is being created. The name can’t be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. Required.

  • grant_access_data (GrantAccessData or IO) – Access data object supplied in the body of the get snapshot access operation. Is either a GrantAccessData type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[AccessUri]

Raises

HttpResponseError

begin_revoke_access(resource_group_name: str, snapshot_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][source]

Revokes access to a snapshot.

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

  • snapshot_name (str) – The name of the snapshot that is being created. The name can’t be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. Required.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_update(resource_group_name: str, snapshot_name: str, snapshot: _models.SnapshotUpdate, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.Snapshot][source]
begin_update(resource_group_name: str, snapshot_name: str, snapshot: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[_models.Snapshot]

Updates (patches) a snapshot.

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

  • snapshot_name (str) – The name of the snapshot that is being created. The name can’t be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. Required.

  • snapshot (SnapshotUpdate or IO) – Snapshot object supplied in the body of the Patch snapshot operation. Is either a SnapshotUpdate type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[Snapshot]

Raises

HttpResponseError

get(resource_group_name: str, snapshot_name: str, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.Snapshot[source]

Gets information about a snapshot.

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

  • snapshot_name (str) – The name of the snapshot that is being created. The name can’t be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. Required.

Keyword Arguments

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

Returns

Snapshot or the result of cls(response)

Return type

Snapshot

Raises

HttpResponseError

list(**kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.Snapshot][source]

Lists snapshots under a subscription.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[Snapshot]

Raises

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.Snapshot][source]

Lists snapshots under a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[Snapshot]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

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

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[Usage]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

Gets a virtual machine extension image.

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

  • publisher_name (str) – Required.

  • type (str) – Required.

  • version (str) – Required.

Keyword Arguments

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

Returns

VirtualMachineExtensionImage or the result of cls(response)

Return type

VirtualMachineExtensionImage

Raises

HttpResponseError

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

Gets a list of virtual machine extension image types.

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

  • publisher_name (str) – Required.

Keyword Arguments

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

Returns

list of VirtualMachineExtensionImage or the result of cls(response)

Return type

list[VirtualMachineExtensionImage]

Raises

HttpResponseError

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

Gets a list of virtual machine extension image versions.

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

  • publisher_name (str) – Required.

  • type (str) – Required.

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

  • top (int) – Default value is None.

  • orderby (str) – Default value is None.

Keyword Arguments

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

Returns

list of VirtualMachineExtensionImage or the result of cls(response)

Return type

list[VirtualMachineExtensionImage]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

The operation to create or update the extension.

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[VirtualMachineExtension]

Raises

HttpResponseError

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

The operation to delete the extension.

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

The operation to update the extension.

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[VirtualMachineExtension]

Raises

HttpResponseError

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

The operation to get the extension.

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

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

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

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

Keyword Arguments

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

Returns

VirtualMachineExtension or the result of cls(response)

Return type

VirtualMachineExtension

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

Gets a virtual machine image.

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

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

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

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

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

Keyword Arguments

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

Returns

VirtualMachineImage or the result of cls(response)

Return type

VirtualMachineImage

Raises

HttpResponseError

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

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

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

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

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

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

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

  • top (int) – Default value is None.

  • orderby (str) – Default value is None.

Keyword Arguments

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

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

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

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

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

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

Keyword Arguments

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

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

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

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

Parameters

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

Keyword Arguments

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

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

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

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

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

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

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

Keyword Arguments

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

Returns

list of VirtualMachineImageResource or the result of cls(response)

Return type

list[VirtualMachineImageResource]

Raises

HttpResponseError

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

get(location: str, command_id: str, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

Returns

RunCommandDocument or the result of cls(response)

Return type

RunCommandDocument

Raises

HttpResponseError

list(location: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[RunCommandDocumentBase]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2017_03_30.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2017_03_30/models/__init__.py'>
class azure.mgmt.compute.v2017_03_30.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, *, 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) – Parameters supplied to the Create VM scale set Extension operation. Is either a VirtualMachineScaleSetExtension type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either 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)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

get(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, expand: Optional[str] = None, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.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.

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

Keyword Arguments

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

Returns

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[azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

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.v2017_03_30.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2017_03_30/models/__init__.py'>
class azure.mgmt.compute.v2017_03_30.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)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_start_os_upgrade(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

get_latest(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

Returns

RollingUpgradeStatusInfo or the result of cls(response)

Return type

RollingUpgradeStatusInfo

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Deletes a virtual machine from a VM scale set.

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_reimage_all(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Restarts a virtual machine in a VM scale set.

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Starts a virtual machine in a VM scale set.

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Gets a virtual machine from a VM scale set.

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

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

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

Keyword Arguments

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

Returns

VirtualMachineScaleSetVM or the result of cls(response)

Return type

VirtualMachineScaleSetVM

Raises

HttpResponseError

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

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

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

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

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

Keyword Arguments

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

Returns

VirtualMachineScaleSetVMInstanceView or the result of cls(response)

Return type

VirtualMachineScaleSetVMInstanceView

Raises

HttpResponseError

list(resource_group_name: str, virtual_machine_scale_set_name: str, filter: Optional[str] = None, select: Optional[str] = None, expand: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.VirtualMachineScaleSetVM][source]

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

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

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

  • filter (str) – The filter to apply to the operation. Allowed values are ‘startswith(instanceView/statuses/code, ‘PowerState’) eq true’, ‘properties/latestModelApplied eq true’, ‘properties/latestModelApplied eq false’. Default value is None.

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

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetVM]

Raises

HttpResponseError

models = <module 'azure.mgmt.compute.v2017_03_30.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/compute/v2017_03_30/models/__init__.py'>
class azure.mgmt.compute.v2017_03_30.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, *, 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) – The scale set object. Is either a VirtualMachineScaleSet type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[VirtualMachineScaleSet]

Raises

HttpResponseError

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

Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Deletes a VM scale set.

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Deletes virtual machines in a VM scale set.

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_update(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, *, 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) – The scale set object. Is either a VirtualMachineScaleSetUpdate type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[VirtualMachineScaleSet]

Raises

HttpResponseError

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

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Display information about a virtual machine scale set.

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

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

Keyword Arguments

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

Returns

VirtualMachineScaleSet or the result of cls(response)

Return type

VirtualMachineScaleSet

Raises

HttpResponseError

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

Gets the status of a VM scale set instance.

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

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

Keyword Arguments

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

Returns

VirtualMachineScaleSetInstanceView or the result of cls(response)

Return type

VirtualMachineScaleSetInstanceView

Raises

HttpResponseError

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

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

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSet]

Raises

HttpResponseError

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

Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSet]

Raises

HttpResponseError

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

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

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

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetSku]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

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

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineSize]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

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

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

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

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[VirtualMachineCaptureResult]

Raises

HttpResponseError

begin_convert_to_managed_disks(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

The operation to create or update a virtual machine.

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[VirtualMachine]

Raises

HttpResponseError

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

The operation to delete a virtual machine.

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_perform_maintenance(resource_group_name: str, vm_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.compute.v2017_03_30.models._models_py3.OperationStatusResponse][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.

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

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

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

The operation to restart a virtual machine.

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_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, *, 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) – Parameters supplied to the Run command operation. Is either a RunCommandInput type or a IO type. Required.

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[RunCommandResult]

Raises

HttpResponseError

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

The operation to start a virtual machine.

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

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

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

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

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

Sets the state of the virtual machine to generalized.

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

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

Keyword Arguments

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

Returns

OperationStatusResponse or the result of cls(response)

Return type

OperationStatusResponse

Raises

HttpResponseError

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

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

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

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

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

Keyword Arguments

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

Returns

VirtualMachine or the result of cls(response)

Return type

VirtualMachine

Raises

HttpResponseError

get_extensions(resource_group_name: str, vm_name: str, expand: Optional[str] = None, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.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.

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

Keyword Arguments

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

Returns

VirtualMachineExtensionsListResult or the result of cls(response)

Return type

VirtualMachineExtensionsListResult

Raises

HttpResponseError

instance_view(resource_group_name: str, vm_name: str, **kwargs: Any)azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

Returns

VirtualMachineInstanceView or the result of cls(response)

Return type

VirtualMachineInstanceView

Raises

HttpResponseError

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

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

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachine]

Raises

HttpResponseError

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

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachine]

Raises

HttpResponseError

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

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

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

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineSize]

Raises

HttpResponseError

list_by_location(location: str, **kwargs: Any)Iterable[azure.mgmt.compute.v2017_03_30.models._models_py3.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.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachine]

Raises

HttpResponseError

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