azure.mgmt.compute.v2016_04_30_preview.operations module

class azure.mgmt.compute.v2016_04_30_preview.operations.AvailabilitySetsOperations(client, config, serializer, deserializer)[source]

Bases: object

AvailabilitySetsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

create_or_update(resource_group_name: str, name: str, parameters: ‘models.AvailabilitySet’, **kwargs: Any) → ’models.AvailabilitySet’[source]

Create or update an availability set.

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

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

  • parameters (AvailabilitySet) – Parameters supplied to the Create Availability Set operation.

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

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, availability_set_name: str, **kwargs: Any) → ’models.OperationStatusResponse’[source]

Delete an availability set.

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

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

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 or None

Raises

~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, availability_set_name: str, **kwargs: Any) → ’models.AvailabilitySet’[source]

Retrieves information about an availability set.

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

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

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

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, **kwargs: Any) → Iterable[‘models.AvailabilitySetListResult’][source]

Lists all availability sets in a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[AvailabilitySetListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_available_sizes(resource_group_name: str, availability_set_name: str, **kwargs: Any) → Iterable[‘models.VirtualMachineSizeListResult’][source]

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param availability_set_name

The name of the availability set.

type availability_set_name

str

keyword callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeListResult]

raises

~azure.core.exceptions.HttpResponseError

list_by_subscription(**kwargs: Any) → Iterable[‘models.AvailabilitySetListResult’][source]

Lists all availability sets in 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 AvailabilitySetListResult or the result of cls(response)

Return type

ItemPaged[AvailabilitySetListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.DisksOperations(client, config, serializer, deserializer)[source]

Bases: object

DisksOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, disk_name: str, disk: ‘models.Disk’, **kwargs: Any) → LROPoller[source]

Creates or updates a disk.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param disk_name

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.

type disk_name

str

param disk

Disk object supplied in the body of the Put disk operation.

type disk

~azure.mgmt.compute.v2016_04_30_preview.models.Disk

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]

raises ~azure.core.exceptions.HttpResponseError

begin_delete(resource_group_name: str, disk_name: str, **kwargs: Any) → LROPoller[source]

Deletes a disk.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param disk_name

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.

type disk_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_grant_access(resource_group_name: str, disk_name: str, grant_access_data: ‘models.GrantAccessData’, **kwargs: Any) → LROPoller[source]

Grants access to a disk.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param disk_name

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.

type disk_name

str

param grant_access_data

Access data object supplied in the body of the get disk access

operation.
type grant_access_data

~azure.mgmt.compute.v2016_04_30_preview.models.GrantAccessData

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]

raises ~azure.core.exceptions.HttpResponseError

begin_revoke_access(resource_group_name: str, disk_name: str, **kwargs: Any) → LROPoller[source]

Revokes access to a disk.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param disk_name

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.

type disk_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_update(resource_group_name: str, disk_name: str, disk: ‘models.DiskUpdate’, **kwargs: Any) → LROPoller[source]

Updates (patches) a disk.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param disk_name

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.

type disk_name

str

param disk

Disk object supplied in the body of the Patch disk operation.

type disk

~azure.mgmt.compute.v2016_04_30_preview.models.DiskUpdate

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Disk]

raises ~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, disk_name: str, **kwargs: Any) → ’models.Disk’[source]

Gets information about a disk.

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

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

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

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any) → Iterable[‘models.DiskList’][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 DiskList or the result of cls(response)

Return type

ItemPaged[DiskList]

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) → Iterable[‘models.DiskList’][source]

Lists all the disks under a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[DiskList]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.ImagesOperations(client, config, serializer, deserializer)[source]

Bases: object

ImagesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, image_name: str, parameters: ‘models.Image’, **kwargs: Any) → LROPoller[source]

Create or update an image.

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

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

  • parameters (Image) – Parameters supplied to the Create Image operation.

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[source]

Deletes an Image.

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → ’models.Image’[source]

Gets an image.

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

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

  • expand (str) – The expand expression to apply on the operation.

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

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any) → Iterable[‘models.ImageListResult’][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 callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.ImageListResult]

raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) → Iterable[‘models.ImageListResult’][source]

Gets the list of images under a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[ImageListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.SnapshotsOperations(client, config, serializer, deserializer)[source]

Bases: object

SnapshotsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, snapshot_name: str, snapshot: ‘models.Snapshot’, **kwargs: Any) → LROPoller[source]

Creates or updates a snapshot.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param snapshot_name

The name of the snapshot within the given subscription and resource

group.
type snapshot_name

str

param snapshot

Snapshot object supplied in the body of the Put disk operation.

type snapshot

~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]

raises ~azure.core.exceptions.HttpResponseError

begin_delete(resource_group_name: str, snapshot_name: str, **kwargs: Any) → LROPoller[source]

Deletes a snapshot.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param snapshot_name

The name of the snapshot within the given subscription and resource

group.
type snapshot_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_grant_access(resource_group_name: str, snapshot_name: str, grant_access_data: ‘models.GrantAccessData’, **kwargs: Any) → LROPoller[source]

Grants access to a snapshot.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param snapshot_name

The name of the snapshot within the given subscription and resource

group.
type snapshot_name

str

param grant_access_data

Access data object supplied in the body of the get snapshot access

operation.
type grant_access_data

~azure.mgmt.compute.v2016_04_30_preview.models.GrantAccessData

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.AccessUri]

raises ~azure.core.exceptions.HttpResponseError

begin_revoke_access(resource_group_name: str, snapshot_name: str, **kwargs: Any) → LROPoller[source]

Revokes access to a snapshot.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param snapshot_name

The name of the snapshot within the given subscription and resource

group.
type snapshot_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_update(resource_group_name: str, snapshot_name: str, snapshot: ‘models.SnapshotUpdate’, **kwargs: Any) → LROPoller[source]

Updates (patches) a snapshot.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param snapshot_name

The name of the snapshot within the given subscription and resource

group.
type snapshot_name

str

param snapshot

Snapshot object supplied in the body of the Patch snapshot operation.

type snapshot

~azure.mgmt.compute.v2016_04_30_preview.models.SnapshotUpdate

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot]

raises ~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, snapshot_name: str, **kwargs: Any) → ’models.Snapshot’[source]

Gets information about a snapshot.

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

  • snapshot_name (str) – The name of the snapshot within the given subscription and resource group.

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

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any) → Iterable[‘models.SnapshotList’][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 SnapshotList or the result of cls(response)

Return type

ItemPaged[SnapshotList]

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) → Iterable[‘models.SnapshotList’][source]

Lists snapshots under a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[SnapshotList]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.UsageOperations(client, config, serializer, deserializer)[source]

Bases: object

UsageOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list(location: str, **kwargs: Any) → Iterable[‘models.ListUsagesResult’][source]

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

param location

The location for which resource usage is queried.

type location

str

keyword callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.ListUsagesResult]

raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionImagesOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineExtensionImagesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

get(location: str, publisher_name: str, type: str, version: str, **kwargs: Any) → ’models.VirtualMachineExtensionImage’[source]

Gets a virtual machine extension image.

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

  • publisher_name (str) –

  • type (str) –

  • version (str) –

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

~azure.core.exceptions.HttpResponseError

list_types(location: str, publisher_name: str, **kwargs: Any) → List[‘models.VirtualMachineExtensionImage’][source]

Gets a list of virtual machine extension image types.

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

  • publisher_name (str) –

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

~azure.core.exceptions.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[‘models.VirtualMachineExtensionImage’][source]

Gets a list of virtual machine extension image versions.

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

  • publisher_name (str) –

  • type (str) –

  • filter (str) – The filter to apply on the operation.

  • top (int) –

  • orderby (str) –

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

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionsOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineExtensionsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, vm_name: str, vm_extension_name: str, extension_parameters: ‘models.VirtualMachineExtension’, **kwargs: Any) → LROPoller[source]

The operation to create or update the extension.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine where the extension should be created or

updated.
type vm_name

str

param vm_extension_name

The name of the virtual machine extension.

type vm_extension_name

str

param extension_parameters

Parameters supplied to the Create Virtual Machine Extension

operation.
type extension_parameters

~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]

raises ~azure.core.exceptions.HttpResponseError

begin_delete(resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any) → LROPoller[source]

The operation to delete the extension.

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

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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’, **kwargs: Any) → LROPoller[source]

The operation to update the extension.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine where the extension should be updated.

type vm_name

str

param vm_extension_name

The name of the virtual machine extension.

type vm_extension_name

str

param extension_parameters

Parameters supplied to the Update Virtual Machine Extension

operation.
type extension_parameters

~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionUpdate

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension]

raises ~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, vm_name: str, vm_extension_name: str, expand: Optional[str] = None, **kwargs: Any) → ’models.VirtualMachineExtension’[source]

The operation to get the extension.

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

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

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

  • expand (str) – The expand expression to apply on the operation.

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

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineImagesOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineImagesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

get(location: str, publisher_name: str, offer: str, skus: str, version: str, **kwargs: Any) → ’models.VirtualMachineImage’[source]

Gets a virtual machine image.

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

  • publisher_name (str) – A valid image publisher.

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

  • skus (str) – A valid image SKU.

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

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

~azure.core.exceptions.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[‘models.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.

  • publisher_name (str) – A valid image publisher.

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

  • skus (str) – A valid image SKU.

  • expand (str) – The expand expression to apply on the operation.

  • top (int) –

  • orderby (str) –

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

~azure.core.exceptions.HttpResponseError

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

  • publisher_name (str) – A valid image publisher.

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

~azure.core.exceptions.HttpResponseError

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

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

~azure.core.exceptions.HttpResponseError

list_skus(location: str, publisher_name: str, offer: str, **kwargs: Any) → List[‘models.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.

  • publisher_name (str) – A valid image publisher.

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

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

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetVMsOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineScaleSetVMsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

param instance_id

The instance ID of the virtual machine.

type instance_id

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

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

Deletes a virtual machine from a VM scale set.

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

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[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.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

param instance_id

The instance ID of the virtual machine.

type instance_id

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

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

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[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.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

param instance_id

The instance ID of the virtual machine.

type instance_id

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → LROPoller[source]

Restarts a virtual machine in a VM scale set.

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

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[source]

Starts a virtual machine in a VM scale set.

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

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → ’models.VirtualMachineScaleSetVM’[source]

Gets a virtual machine from a VM scale set.

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

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

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

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

~azure.core.exceptions.HttpResponseError

get_instance_view(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → ’models.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.

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

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

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

~azure.core.exceptions.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[‘models.VirtualMachineScaleSetVMListResult’][source]

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

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

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

  • filter (str) – The filter to apply to the operation.

  • select (str) – The list parameters.

  • expand (str) – The expand expression to apply to the operation.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetVMListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetsOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineScaleSetsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, name: str, parameters: ‘models.VirtualMachineScaleSet’, **kwargs: Any) → LROPoller[source]

Create or update a VM scale set.

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

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

  • parameters (VirtualMachineScaleSet) – The scale set object.

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) – True for ARMPolling, False for no polling, or a polling object for 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, **kwargs: Any) → LROPoller[source]

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.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

param vm_instance_i_ds

A list of virtual machine instance IDs from the VM scale set.

type vm_instance_i_ds

~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceIDs

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

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

Deletes a VM scale set.

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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’, **kwargs: Any) → LROPoller[source]

Deletes virtual machines in a VM scale set.

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

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

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceRequiredIDs) – A list of virtual machine instance IDs from the VM scale set.

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) – True for ARMPolling, False for no polling, or a polling object for 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, **kwargs: Any) → LROPoller[source]

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.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

param vm_instance_i_ds

A list of virtual machine instance IDs from the VM scale set.

type vm_instance_i_ds

~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceIDs

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_reimage(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → LROPoller[source]

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

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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, **kwargs: Any) → LROPoller[source]

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[‘models.VirtualMachineScaleSetVMInstanceIDs’] = None, **kwargs: Any) → LROPoller[source]

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

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

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

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs) – A list of virtual machine instance IDs from the VM scale set.

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) – True for ARMPolling, False for no polling, or a polling object for 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, **kwargs: Any) → LROPoller[source]

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

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

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

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceIDs) – A list of virtual machine instance IDs from the VM scale set.

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) – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

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

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: ‘models.VirtualMachineScaleSetVMInstanceRequiredIDs’, **kwargs: Any) → LROPoller[source]

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.

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

  • vm_instance_i_ds (VirtualMachineScaleSetVMInstanceRequiredIDs) – A list of virtual machine instance IDs from the VM scale set.

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) – True for ARMPolling, False for no polling, or a polling object for 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) → ’models.VirtualMachineScaleSet’[source]

Display information about a virtual machine scale set.

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

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

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

~azure.core.exceptions.HttpResponseError

get_instance_view(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → ’models.VirtualMachineScaleSetInstanceView’[source]

Gets the status of a VM scale set instance.

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

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

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

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, **kwargs: Any) → Iterable[‘models.VirtualMachineScaleSetListResult’][source]

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

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_all(**kwargs: Any) → Iterable[‘models.VirtualMachineScaleSetListWithLinkResult’][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 callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetListWithLinkResult]

raises

~azure.core.exceptions.HttpResponseError

list_skus(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → Iterable[‘models.VirtualMachineScaleSetListSkusResult’][source]

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_scale_set_name

The name of the VM scale set.

type vm_scale_set_name

str

keyword callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetListSkusResult]

raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineSizesOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineSizesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list(location: str, **kwargs: Any) → Iterable[‘models.VirtualMachineSizeListResult’][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.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineSizeListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>
class azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachinesOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachinesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_capture(resource_group_name: str, vm_name: str, parameters: ‘models.VirtualMachineCaptureParameters’, **kwargs: Any) → LROPoller[source]

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine.

type vm_name

str

param parameters

Parameters supplied to the Capture Virtual Machine operation.

type parameters

~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureParameters

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineCaptureResult]

raises ~azure.core.exceptions.HttpResponseError

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

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine.

type vm_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

begin_create_or_update(resource_group_name: str, vm_name: str, parameters: ‘models.VirtualMachine’, **kwargs: Any) → LROPoller[source]

The operation to create or update a virtual machine.

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

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

  • parameters (VirtualMachine) – Parameters supplied to the Create Virtual Machine operation.

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[source]

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine.

type vm_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

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

The operation to delete a virtual machine.

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[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.

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine.

type vm_name

str

keyword callable cls

A custom type or function that will be passed the direct response

keyword str continuation_token

A continuation token to restart a poller from a saved state.

keyword polling

True for ARMPolling, False for no polling, or a polling object for personal polling strategy

paramtype polling

bool or ~azure.core.polling.PollingMethod

keyword int polling_interval

Default waiting time between two polls for LRO operations if no Retry-After header is present.

return

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

rtype

~azure.core.polling.LROPoller[~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse]

raises ~azure.core.exceptions.HttpResponseError

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → LROPoller[source]

The operation to restart a virtual machine.

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

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

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) – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

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

Returns

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

Return type

LROPoller[OperationStatusResponse]

Raises

HttpResponseError

begin_start(resource_group_name: str, vm_name: str, **kwargs: Any) → LROPoller[source]

The operation to start a virtual machine.

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

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

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) – True for ARMPolling, False for no polling, or a polling object for 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) → ’models.OperationStatusResponse’[source]

Sets the state of the virtual machine to generalized.

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

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

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

~azure.core.exceptions.HttpResponseError

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

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

  • expand (str) – The expand expression to apply on the operation.

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

~azure.core.exceptions.HttpResponseError

get_extensions(resource_group_name: str, vm_name: str, expand: Optional[str] = None, **kwargs: Any) → ’models.VirtualMachineExtensionsListResult’[source]

The operation to get all extensions of a Virtual Machine.

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

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

  • expand (str) – The expand expression to apply on the operation.

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

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, **kwargs: Any) → Iterable[‘models.VirtualMachineListResult’][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.

param resource_group_name

The name of the resource group.

type resource_group_name

str

keyword callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineListResult]

raises

~azure.core.exceptions.HttpResponseError

list_all(**kwargs: Any) → Iterable[‘models.VirtualMachineListResult’][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 callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineListResult]

raises

~azure.core.exceptions.HttpResponseError

list_available_sizes(resource_group_name: str, vm_name: str, **kwargs: Any) → Iterable[‘models.VirtualMachineSizeListResult’][source]

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

param resource_group_name

The name of the resource group.

type resource_group_name

str

param vm_name

The name of the virtual machine.

type vm_name

str

keyword callable cls

A custom type or function that will be passed the direct response

return

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

rtype

~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineSizeListResult]

raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py'>