azure.mgmt.compute.v2017_12_01.operations module

class azure.mgmt.compute.v2017_12_01.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, availability_set_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.

  • availability_set_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) → Optional[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.

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

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

Return type

ItemPaged[VirtualMachineSizeListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_by_subscription(expand: Optional[str] = None, **kwargs: Any) → Iterable[models.AvailabilitySetListResult][source]

Lists all availability sets in a subscription.

Parameters

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

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

update(resource_group_name: str, availability_set_name: str, parameters: models.AvailabilitySetUpdate, **kwargs: Any) → models.AvailabilitySet[source]

Update an availability set.

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

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

  • parameters (AvailabilitySetUpdate) – Parameters supplied to the Update 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

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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[models.Image][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[models.OperationStatusResponse][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 –

begin_update(resource_group_name: str, image_name: str, parameters: models.ImageUpdate, **kwargs: Any) → LROPoller[models.Image][source]

Update an image.

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

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

  • parameters (ImageUpdate) – Parameters supplied to the Update 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 –

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

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.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.operations.LogAnalyticsOperations(client, config, serializer, deserializer)[source]

Bases: object

LogAnalyticsOperations 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_export_request_rate_by_interval(location: str, parameters: models.RequestRateByIntervalInput, **kwargs: Any) → LROPoller[models.LogAnalyticsOperationResult][source]

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

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

  • parameters (RequestRateByIntervalInput) – Parameters supplied to the LogAnalytics getRequestRateByInterval Api.

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 LogAnalyticsOperationResult or the result of cls(response)

Return type

LROPoller[LogAnalyticsOperationResult]

Raises

HttpResponseError –

begin_export_throttled_requests(location: str, parameters: models.LogAnalyticsInputBase, **kwargs: Any) → LROPoller[models.LogAnalyticsOperationResult][source]

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

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

  • parameters (LogAnalyticsInputBase) – Parameters supplied to the LogAnalytics getThrottledRequests Api.

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 LogAnalyticsOperationResult or the result of cls(response)

Return type

LROPoller[LogAnalyticsOperationResult]

Raises

HttpResponseError –

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations 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(**kwargs: Any) → Iterable[models.ComputeOperationListResult][source]

Gets a list of compute operations.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[ComputeOperationListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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.

Parameters

location (str) – The location for which resource usage 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 ListUsagesResult or the result of cls(response)

Return type

ItemPaged[ListUsagesResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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[models.VirtualMachineExtension][source]

The operation to create or update 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 created or updated.

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

  • extension_parameters (VirtualMachineExtension) – Parameters supplied to the Create Virtual Machine Extension 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 VirtualMachineExtension or the result of cls(response)

Return type

LROPoller[VirtualMachineExtension]

Raises

HttpResponseError –

begin_delete(resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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[models.VirtualMachineExtension][source]

The operation to update 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 updated.

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

  • extension_parameters (VirtualMachineExtensionUpdate) – Parameters supplied to the Update Virtual Machine Extension 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 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) → 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.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineRunCommandsOperations 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, command_id: str, **kwargs: Any) → models.RunCommandDocument[source]

Gets specific run command for a subscription in a location.

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

  • command_id (str) – The command id.

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

~azure.core.exceptions.HttpResponseError

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

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

Parameters

location (str) – The location upon which run commands 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 RunCommandListResult or the result of cls(response)

Return type

ItemPaged[RunCommandListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetExtensionsOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineScaleSetExtensionsOperations 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_scale_set_name: str, vmss_extension_name: str, extension_parameters: models.VirtualMachineScaleSetExtension, **kwargs: Any) → LROPoller[models.VirtualMachineScaleSetExtension][source]

The operation to create or update an extension.

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

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

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

  • extension_parameters (VirtualMachineScaleSetExtension) – Parameters supplied to the Create VM scale set Extension 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 VirtualMachineScaleSetExtension or the result of cls(response)

Return type

LROPoller[VirtualMachineScaleSetExtension]

Raises

HttpResponseError –

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

The operation to delete the extension.

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

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

  • vmss_extension_name (str) – The name of the VM scale set 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 –

get(resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, expand: Optional[str] = None, **kwargs: Any) → models.VirtualMachineScaleSetExtension[source]

The operation to get the extension.

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

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

  • vmss_extension_name (str) – The name of the VM scale set 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

VirtualMachineScaleSetExtension, or the result of cls(response)

Return type

VirtualMachineScaleSetExtension

Raises

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → Iterable[models.VirtualMachineScaleSetExtensionListResult][source]

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineScaleSetExtensionListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetRollingUpgradesOperations(client, config, serializer, deserializer)[source]

Bases: object

VirtualMachineScaleSetRollingUpgradesOperations 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_cancel(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

Cancels the current virtual machine scale set rolling upgrade.

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

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

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

  • 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

RollingUpgradeStatusInfo, or the result of cls(response)

Return type

RollingUpgradeStatusInfo

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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[models.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.

  • 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_delete(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

Performs maintenance on 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_power_off(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → LROPoller[models.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.

  • 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_redeploy(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

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

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

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

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

  • 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_restart(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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[models.OperationStatusResponse][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 –

begin_update(resource_group_name: str, vm_scale_set_name: str, instance_id: str, parameters: models.VirtualMachineScaleSetVM, **kwargs: Any) → LROPoller[models.VirtualMachineScaleSetVM][source]

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

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

  • parameters (VirtualMachineScaleSetVM) – Parameters supplied to the Update Virtual Machine Scale Sets VM 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 VirtualMachineScaleSetVM or the result of cls(response)

Return type

LROPoller[VirtualMachineScaleSetVM]

Raises

HttpResponseError –

get(resource_group_name: str, vm_scale_set_name: str, instance_id: str, **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. Allowed values are ‘startswith(instanceView/statuses/code, ‘PowerState’) eq true’, ‘properties/latestModelApplied eq true’, ‘properties/latestModelApplied eq false’.

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

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

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.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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, vm_scale_set_name: str, parameters: models.VirtualMachineScaleSet, **kwargs: Any) → LROPoller[models.VirtualMachineScaleSet][source]

Create or update 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 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[models.OperationStatusResponse][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.

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_delete(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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[models.OperationStatusResponse][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_perform_maintenance(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[models.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual- machine-scale-sets-maintenance-notifications.

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

  • 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_power_off(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[models.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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.

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_redeploy(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[models.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

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

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

  • 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_reimage(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[models.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

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

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

  • 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_reimage_all(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[models.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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.

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_restart(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: Optional[models.VirtualMachineScaleSetVMInstanceIDs] = None, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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[models.OperationStatusResponse][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(resource_group_name: str, vm_scale_set_name: str, parameters: models.VirtualMachineScaleSetUpdate, **kwargs: Any) → LROPoller[models.VirtualMachineScaleSet][source]

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

  • parameters (VirtualMachineScaleSetUpdate) – 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_update_instances(resource_group_name: str, vm_scale_set_name: str, vm_instance_i_ds: models.VirtualMachineScaleSetVMInstanceRequiredIDs, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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 –

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

Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.

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

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

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

Keyword Arguments

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

Returns

RecoveryWalkResponse, or the result of cls(response)

Return type

RecoveryWalkResponse

Raises

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

get_os_upgrade_history(resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) → Iterable[models.VirtualMachineScaleSetListOSUpgradeHistory][source]

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

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

Return type

ItemPaged[VirtualMachineScaleSetListOSUpgradeHistory]

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 Arguments

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

Returns

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

Return type

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

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

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

Return type

ItemPaged[VirtualMachineScaleSetListSkusResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>
class azure.mgmt.compute.v2017_12_01.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[models.VirtualMachineCaptureResult][source]

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.

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

  • parameters (VirtualMachineCaptureParameters) – Parameters supplied to the Capture 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 VirtualMachineCaptureResult or the result of cls(response)

Return type

LROPoller[VirtualMachineCaptureResult]

Raises

HttpResponseError –

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

  • 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_create_or_update(resource_group_name: str, vm_name: str, parameters: models.VirtualMachine, **kwargs: Any) → LROPoller[models.VirtualMachine][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[models.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.

  • 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_delete(resource_group_name: str, vm_name: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][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_perform_maintenance(resource_group_name: str, vm_name: str, **kwargs: Any) → LROPoller[models.OperationStatusResponse][source]

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

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

  • 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[models.OperationStatusResponse][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_run_command(resource_group_name: str, vm_name: str, parameters: models.RunCommandInput, **kwargs: Any) → LROPoller[models.RunCommandResult][source]

Run command on the VM.

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

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

  • parameters (RunCommandInput) – Parameters supplied to the Run command 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 RunCommandResult or the result of cls(response)

Return type

LROPoller[RunCommandResult]

Raises

HttpResponseError –

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

begin_update(resource_group_name: str, vm_name: str, parameters: models.VirtualMachineUpdate, **kwargs: Any) → LROPoller[models.VirtualMachine][source]

The operation to 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 (VirtualMachineUpdate) – Parameters supplied to the Update 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 –

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

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

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

Returns

VirtualMachineInstanceView, or the result of cls(response)

Return type

VirtualMachineInstanceView

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.

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 VirtualMachineListResult or the result of cls(response)

Return type

ItemPaged[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 Arguments

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

Returns

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

Return type

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

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

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

Return type

ItemPaged[VirtualMachineSizeListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_by_location(location: str, **kwargs: Any) → Iterable[models.VirtualMachineListResult][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.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[VirtualMachineListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2017_12_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/compute/v2017_12_01/models/__init__.py'>